-
Notifications
You must be signed in to change notification settings - Fork 6
73 lines (60 loc) · 1.81 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: 打包并生成应用
on:
pull_request:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Build and package for Windows
if: matrix.os == 'windows-latest'
run: yarn build:win
- name: Build and package for macOS
if: matrix.os == 'macos-latest'
run: yarn build:mac
- name: Build and package for Linux
if: matrix.os == 'ubuntu-latest'
run: yarn build:linux
- name: Upload artifact for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboard-Windows
path: dist/*.exe
- name: Upload artifact for macOS
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboard-macOS
path: dist/*.dmg
- name: Upload artifact for Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: ExamShowboard-Linux
path: dist/*.AppImage
- name: Upload assets to GitHub Release
if: github.event_name == 'release' && github.event.action == 'published'
uses: softprops/action-gh-release@v1
with:
files: |
dist/*.exe
dist/*.dmg
dist/*.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}