1+ name : Build & Release
2+
3+ on :
4+ release :
5+ types : [published] # <- runs when you hit “Publish release” (draft→public)
6+ push :
7+ tags : ['v*'] # <- also runs if you push a version tag manually
8+
9+ env :
10+ NODE_VERSION : 20
11+
12+ jobs :
13+ build-ui :
14+ name : Build renderer
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : ${{ env.NODE_VERSION }}
21+ cache : npm
22+ - run : npm ci
23+ - run : npm run build:ui
24+ - uses : actions/upload-artifact@v4
25+ with :
26+ name : dist
27+ path : dist
28+
29+ package :
30+ name : Package ${{ matrix.os }}
31+ needs : build-ui
32+ strategy :
33+ fail-fast : false
34+ matrix :
35+ include :
36+ - os : windows-latest # builds NSIS x64
37+ - os : macos-latest # builds DMG + ZIP universal
38+ - os : ubuntu-latest # builds AppImage x64
39+ runs-on : ${{ matrix.os }}
40+ steps :
41+ - uses : actions/checkout@v4
42+ - uses : actions/setup-node@v4
43+ with :
44+ node-version : ${{ env.NODE_VERSION }}
45+ cache : npm
46+ - run : npm ci
47+
48+ # download the ready-made dist folder
49+ - uses : actions/download-artifact@v4
50+ with :
51+ name : dist
52+ path : dist
53+
54+ # Linux needs extra tools for AppImage
55+ - if : runner.os == 'Linux'
56+ run : sudo apt-get update && sudo apt-get install -y fuse libfuse2
57+
58+ # do the actual packaging
59+ - run : node build.js --build=platform
60+ env :
61+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }} # electron-builder needs this to upload
62+
63+ # upload artifacts to the job summary (optional)
64+ - uses : actions/upload-artifact@v4
65+ with :
66+ name : ${{ matrix.os }}-artifacts
67+ path : build/*.*
0 commit comments