2022-07-27 18:44:52 +08:00
|
|
|
name: Build
|
2022-02-18 00:23:52 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
- "**.spec.js"
|
|
|
|
- ".idea"
|
|
|
|
- ".vscode"
|
|
|
|
- ".dockerignore"
|
|
|
|
- "Dockerfile"
|
|
|
|
- ".gitignore"
|
|
|
|
- ".github/**"
|
2022-07-27 18:48:56 +08:00
|
|
|
- "!.github/workflows/build.yml"
|
2022-02-18 00:23:52 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-07-25 21:28:13 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2022-02-18 00:23:52 +08:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-07-25 21:28:13 +08:00
|
|
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
2022-02-18 00:23:52 +08:00
|
|
|
|
|
|
|
steps:
|
2022-07-25 21:28:13 +08:00
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
2022-02-18 00:23:52 +08:00
|
|
|
|
2022-07-25 21:28:13 +08:00
|
|
|
- name: Setup Node.js
|
2022-02-18 00:23:52 +08:00
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-07-25 21:28:13 +08:00
|
|
|
node-version: 14
|
2022-02-18 00:23:52 +08:00
|
|
|
|
2022-07-25 21:28:13 +08:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
2022-02-18 00:23:52 +08:00
|
|
|
|
2022-07-25 21:28:13 +08:00
|
|
|
- name: Build Release Files
|
|
|
|
run: npm run build
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-02-18 00:23:52 +08:00
|
|
|
|
2022-07-25 21:28:13 +08:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-18 00:23:52 +08:00
|
|
|
with:
|
2022-07-25 21:28:13 +08:00
|
|
|
name: release_on_${{ matrix. os }}
|
|
|
|
path: release/
|
|
|
|
retention-days: 5
|