Skip to content

Commit 1cdc512

Browse files
committed
chore: update CI workflow to use specific targets for Electron builds and add electron-builder configuration
1 parent bd58bf7 commit 1cdc512

File tree

2 files changed

+51
-3
lines changed

2 files changed

+51
-3
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,23 @@ jobs:
117117
if: matrix.platform == 'linux'
118118
run: |
119119
cd apps
120-
npx electron-builder --linux --x64 --publish=never
120+
npx electron-builder --linux tar.gz --x64 --publish=never
121121
env:
122122
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123123

124124
- name: Build Electron app (Windows)
125125
if: matrix.platform == 'win'
126126
run: |
127127
cd apps
128-
npx electron-builder --win --x64 --publish=never
128+
npx electron-builder --win portable --x64 --publish=never
129129
env:
130130
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131131

132132
- name: Build Electron app (macOS)
133133
if: matrix.platform == 'mac'
134134
run: |
135135
cd apps
136-
npx electron-builder --mac --x64 --publish=never
136+
npx electron-builder --mac dmg --x64 --publish=never
137137
env:
138138
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139139
CSC_IDENTITY_AUTO_DISCOVERY: false

apps/electron-builder.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"appId": "com.hackariens.electron",
3+
"productName": "Hackariens Electron App",
4+
"directories": {
5+
"output": "dist"
6+
},
7+
"files": [
8+
"**/*",
9+
"!node_modules/**/*",
10+
"!src/**/*",
11+
"!.git/**/*",
12+
"!dist/**/*"
13+
],
14+
"linux": {
15+
"target": [
16+
{
17+
"target": "tar.gz",
18+
"arch": ["x64"]
19+
}
20+
],
21+
"category": "Development",
22+
"icon": "icon.png"
23+
},
24+
"win": {
25+
"target": [
26+
{
27+
"target": "portable",
28+
"arch": ["x64"]
29+
}
30+
],
31+
"icon": "icon.ico"
32+
},
33+
"mac": {
34+
"target": [
35+
{
36+
"target": "dmg",
37+
"arch": ["x64"]
38+
}
39+
],
40+
"category": "public.app-category.developer-tools",
41+
"icon": "icon.icns"
42+
},
43+
"compression": "normal",
44+
"nsis": {
45+
"oneClick": false,
46+
"allowToChangeInstallationDirectory": true
47+
}
48+
}

0 commit comments

Comments
 (0)