File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build Electron App
2+ run-name : Vuilding release ${{ github.ref_name }} ✘
23
34on :
45 push :
@@ -31,14 +32,39 @@ jobs:
3132 - uses : actions/setup-node@v4
3233 with :
3334 node-version : ' 22'
34- cache : ' npm'
35+
36+ # Cache node_modules keyed on the lockfile — skips npm install entirely on hit
37+ - uses : actions/cache@v4
38+ id : cache-deps
39+ with :
40+ path : node_modules
41+ key : ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
3542
3643 - name : Install Python setuptools (node-gyp needs distutils, removed in Python 3.12)
44+ if : steps.cache-deps.outputs.cache-hit != 'true'
3745 run : pip3 install setuptools --break-system-packages
3846
3947 - name : Install dependencies
48+ if : steps.cache-deps.outputs.cache-hit != 'true'
4049 run : npm ci
4150
51+ # On cache hit npm ci (and its postinstall: nuxt prepare) was skipped — run it manually
52+ - name : Prepare Nuxt types
53+ if : steps.cache-deps.outputs.cache-hit == 'true'
54+ run : npx nuxt prepare
55+
56+ # Cache the Electron and electron-builder download caches (~100-200 MB per arch)
57+ - uses : actions/cache@v4
58+ with :
59+ path : |
60+ ~/.cache/electron
61+ ~/.cache/electron-builder
62+ ${{ env.LOCALAPPDATA }}\electron\Cache
63+ ${{ env.LOCALAPPDATA }}\electron-builder\Cache
64+ key : ${{ runner.os }}-electron-${{ hashFiles('package-lock.json') }}
65+ restore-keys : |
66+ ${{ runner.os }}-electron-
67+
4268 - name : Build
4369 run : npm run ${{ matrix.script }}
4470 env :
You can’t perform that action at this time.
0 commit comments