55 tags :
66 - ' v*'
77
8- jobs :
9- release :
10- runs-on : ${{ matrix.os }}
11-
12- permissions :
13- contents : write
14-
15- strategy :
16- matrix :
17- os : [macos-latest, ubuntu-latest, windows-latest]
8+ permissions :
9+ # required to modify releases
10+ contents : write
1811
12+ jobs :
13+ release-linux :
14+ runs-on : ubuntu-latest
1915 steps :
20- - uses : actions/checkout@v4
16+ - name : Checkout
17+ uses : actions/checkout@v4
2118 with :
2219 submodules : recursive
2320 persist-credentials : false
@@ -26,30 +23,44 @@ jobs:
2623 with :
2724 node-version : 22
2825 - name : Install dependencies
29- run : npm ci
26+ run : npm ci --loglevel=info
3027 - name : Fetch
3128 run : npm run fetch
32-
3329 - name : Compile
3430 run : npm run webpack:prod
35-
36- - name : Package Windows
37- if : runner.os == 'Windows'
31+ - name : Package
3832 run : |
39- node release-automation/build.js --windows --microsoft-store --x64 --ia32 --arm64 --production
40- node release-automation/build.js --windows-portable --x64 --production
41- node release-automation/build.js --windows-legacy --ia32 --x64 --production
33+ node release-automation/build.js --debian --tarball --appimage --x64 --armv7l --arm64 --production
4234 env :
4335 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44- - name : Upload Microsoft Store Artifact
45- if : runner.os == 'Windows'
36+ - name : Upload artifacts
4637 uses : actions/upload-artifact@v4
4738 with :
48- name : appx
49- path : dist/*.appx
39+ name : linux
40+ path : |
41+ dist/*.deb
42+ dist/*.tar.gz
43+ dist/*.AppImage
5044
51- - name : Package macOS
52- if : runner.os == 'macOS'
45+ release-mac :
46+ runs-on : macos-latest
47+ steps :
48+ - name : Checkout
49+ uses : actions/checkout@v4
50+ with :
51+ submodules : recursive
52+ persist-credentials : false
53+ - name : Install Node.js
54+ uses : actions/setup-node@v4
55+ with :
56+ node-version : 22
57+ - name : Install dependencies
58+ run : npm ci --loglevel=info
59+ - name : Fetch
60+ run : npm run fetch
61+ - name : Compile
62+ run : npm run webpack:prod
63+ - name : Package
5364 run : |
5465 # I don't trust GitHub Actions to not accidentally log shell substitutions somewhere, so we
5566 # use Python instead of "echo $SECRET >" to write the private key to a file as needed by notarytool.
@@ -72,10 +83,63 @@ jobs:
7283 # electron-builder documentation says password won't be escaped, so don't use any
7384 # special characters that the shell will mess with
7485 CSC_KEY_PASSWORD : ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
86+ - name : Upload artifacts
87+ uses : actions/upload-artifact@v4
88+ with :
89+ name : mac
90+ path : dist/*.dmg
7591
76- - name : Package Linux
77- if : runner.os == 'Linux'
92+ release-windows :
93+ # GitHub's Windows runners have a C: drive and a D: drive.
94+ # C: is for the OS and has good read performance but awful write performance.
95+ # D: has much better faster write performance (>20x faster than C:)
96+ # We want to use the D: drive whenever we can. Trying to do "npm ci" on the C:
97+ # drive has been observed to take over an hour!
98+ runs-on : windows-latest
99+ steps :
100+ # actions/checkout can only clone to paths in $GITHUB_WORKSPACE which is on the C: drive,
101+ # so we have to clone to C: then copy to D: after. This repository itself isn't huge so
102+ # this is plenty fast.
103+ - name : Checkout
104+ uses : actions/checkout@v4
105+ with :
106+ submodules : recursive
107+ persist-credentials : false
108+ path : repo
109+ - name : " Move repository to D: drive"
78110 run : |
79- node release-automation/build.js --debian --tarball --appimage --x64 --armv7l --arm64 --production
111+ Copy-Item -Path repo -Destination D:\repo -Recurse
112+ Remove-Item -Path repo -Recurse -Force
113+ - name : Install Node.js
114+ uses : actions/setup-node@v4
115+ with :
116+ node-version : 22
117+ # The repository being on D: means that node_modules IO will be fast, but npm still downloads
118+ # packages to a temporary folder for caching which is on C: by default. We need to make sure
119+ # npm uses the D: drive instead otherwise we still get bottlenecked by C:.
120+ - name : " Configure npm to use D: drive"
121+ run : |
122+ npm config set cache D:\npm-cache
123+ npm config set prefix D:\npm-prefix
124+ - name : Install dependencies
125+ working-directory : D:\repo
126+ run : npm ci --loglevel=info
127+ - name : Fetch
128+ working-directory : D:\repo
129+ run : npm run fetch
130+ - name : Compile
131+ working-directory : D:\repo
132+ run : npm run webpack:prod
133+ - name : Package
134+ working-directory : D:\repo
135+ run : |
136+ node release-automation/build.js --windows --microsoft-store --x64 --ia32 --arm64 --production
137+ node release-automation/build.js --windows-portable --x64 --production
138+ node release-automation/build.js --windows-legacy --ia32 --x64 --production
80139 env :
81140 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
141+ - name : Upload Microsoft Store Artifact
142+ uses : actions/upload-artifact@v4
143+ with :
144+ name : appx
145+ path : D:\repo\dist\*.appx
0 commit comments