Skip to content

Commit 783bd44

Browse files
committed
fix: adjust builder config & cache location
1 parent d153de6 commit 783bd44

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ jobs:
3434
# the first number is used for pushes to the main branch (releases)
3535
# the second number is used for pull requests (to keep the storage usage low)
3636
ARTIFACT_RETENTION_DAYS: ${{ github.event_name == 'push' && github.ref_name == 'main' && 4 || 1 }}
37-
# cache directory for electron-builder files
38-
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
37+
# set cache directory for electron-builder files
38+
ELECTRON_CACHE: ".cache/electron"
39+
ELECTRON_BUILDER_CACHE: ".cache/electron-builder"
3940

4041
strategy:
4142
# don't cancel other jobs when one fails
@@ -108,7 +109,9 @@ jobs:
108109
- name: Setup electron-builder cache
109110
uses: actions/cache@v4
110111
with:
111-
path: ${{ env.ELECTRON_BUILDER_CACHE }}
112+
path: |
113+
${{ env.ELECTRON_CACHE }}
114+
${{ env.ELECTRON_BUILDER_CACHE }}
112115
key: ${{ matrix.os }}-electron-builder-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/electron-builder.json5') }}
113116
restore-keys: ${{ matrix.os }}-electron-builder-
114117

@@ -118,6 +121,6 @@ jobs:
118121
- name: Upload artifacts
119122
uses: actions/upload-artifact@v4
120123
with:
121-
name: "${{ matrix.os }}-${{ github.ref_name }}-${{ github.sha }}"
124+
name: "${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }}"
122125
path: release
123126
retention-days: ${{ env.ARTIFACT_RETENTION_DAYS }}

electron-builder.json5

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
target: "nsis",
2222
arch: [
2323
"x64",
24-
// "arm64"
24+
"arm64"
2525
],
2626
},
2727
],
28-
artifactName: "${productName}-${version}-Windows_Setup.${ext}",
28+
artifactName: "${productName}-${version}-Windows.${ext}",
2929
},
3030
nsis: {
3131
oneClick: false,
@@ -35,9 +35,15 @@
3535
},
3636
mac: {
3737
target: [
38-
"dmg"
38+
{
39+
target: "pkg",
40+
arch: [
41+
"x64",
42+
"arm64"
43+
],
44+
}
3945
],
40-
artifactName: "${productName}-${version}-MacOS_Installer.${ext}",
46+
artifactName: "${productName}-${version}-MacOS.${ext}",
4147
},
4248
linux: {
4349
target: [

0 commit comments

Comments
 (0)