chore: 缓存 electron 和 electron-builder 二进制文件以加速打包

This commit is contained in:
digua
2026-04-10 21:28:27 +08:00
committed by digua
parent 62b4816060
commit 5b7d695507
+30
View File
@@ -59,6 +59,16 @@ jobs:
echo "node-linker=hoisted" >> .npmrc
pnpm install
- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/Library/Caches/electron
~/Library/Caches/electron-builder
key: ${{ runner.os }}-${{ matrix.arch }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-electron-builder-
# macOS 签名和公证需要的 API Key 文件
- name: Create Apple API Key File
run: |
@@ -125,6 +135,16 @@ jobs:
echo "node-linker=hoisted" >> .npmrc
pnpm install
- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/AppData/Local/electron/Cache
~/AppData/Local/electron-builder/Cache
key: ${{ runner.os }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-
- name: Build Electron app for Windows
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -177,6 +197,16 @@ jobs:
echo "node-linker=hoisted" >> .npmrc
pnpm install
- name: Cache Electron and electron-builder binaries
uses: actions/cache@v5
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-electron-builder-
- name: Build Electron app for Linux
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}