forked from Qortal/q-shop
46 lines
859 B
YAML
46 lines
859 B
YAML
name: build-and-zip
|
|
|
|
on:
|
|
# Build on any branch push and on version tags (v*)
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags:
|
|
- 'v*'
|
|
# Build on any pull request (any source/target branches)
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
# Also build on release events in Gitea
|
|
release:
|
|
types: [published, created]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Node LTS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 'lts/*'
|
|
|
|
- name: Install deps
|
|
run: npm ci
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Zip dist
|
|
run: |
|
|
cd dist
|
|
zip -r ../dist.zip .
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: dist
|
|
path: dist.zip
|