File tree Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Release Electron App
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*' # Trigger only on version tags like v1.0.0
7
+
8
+ permissions :
9
+ contents : write # required for creating releases & uploading assets
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ${{ matrix.os }}
14
+
15
+ strategy :
16
+ matrix :
17
+ os : [windows-latest, macos-latest]
18
+
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Setup Node.js
24
+ uses : actions/setup-node@v4
25
+ with :
26
+ node-version : 22
27
+
28
+ - name : Install dependencies
29
+ run : npm ci
30
+
31
+ - name : Package Electron app
32
+ run : npm run build:${{ matrix.os == 'windows-latest' && 'win' || (matrix.os == 'macos-latest' && 'mac' || 'linux') }}
33
+
34
+ - name : Upload build artifacts
35
+ uses : actions/upload-artifact@v4
36
+ with :
37
+ name : electron-build-${{ matrix.os }}
38
+ path : dist/** # electron-builder output folder
39
+
40
+ release :
41
+ needs : build
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ - name : Download artifacts
45
+ uses : actions/download-artifact@v4
46
+ with :
47
+ path : ./dist
48
+
49
+ - name : Create GitHub Release
50
+ uses : softprops/action-gh-release@v2
51
+ with :
52
+ draft : true
53
+ files : |
54
+ dist/**/interview-coder-cn-*.dmg
55
+ dist/**/interview-coder-cn-*.exe
56
+ env :
57
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
node_modules
2
2
out
3
+ dist
3
4
.DS_Store
4
5
.eslintcache
5
6
* .log *
Original file line number Diff line number Diff line change 1
1
appId : com.electron.app
2
- productName : electron-app
2
+ productName : 解题助手
3
3
directories :
4
4
buildResources : build
5
5
files :
12
12
asarUnpack :
13
13
- resources/**
14
14
win :
15
- executableName : electron-app
15
+ executableName : 解题助手
16
16
nsis :
17
17
artifactName : ${name}-${version}-setup.${ext}
18
18
shortcutName : ${productName}
You can’t perform that action at this time.
0 commit comments