Skip to content

Commit 184d057

Browse files
committed
fix: disable electron-builder auto-publish to prevent 403 errors
- Add publish: null to build config to prevent automatic release creation - Set PUBLISH=never environment variable in workflow - Add contents: read permission to build jobs - Let release job handle all release creation instead of electron-builder
1 parent f108661 commit 184d057

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
build:
1313
runs-on: ${{ matrix.os }}
1414

15+
# Permissions needed in case electron-builder tries to publish
16+
permissions:
17+
contents: read
18+
1519
# Build for multiple platforms in parallel
1620
strategy:
1721
matrix:
@@ -38,8 +42,9 @@ jobs:
3842
- name: Build application
3943
run: npm run build
4044
env:
41-
# GitHub token for publishing releases
42-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
# Disable automatic publishing by electron-builder
46+
# We handle releases through the release job instead
47+
PUBLISH: never
4348

4449
- name: Extract version from package.json
4550
id: get_version

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"compression": "maximum",
1313
"asar": true,
1414
"electronLanguages": ["en-US"],
15+
"publish": null,
1516
"files": [
1617
"src/**/*",
1718
"!**/*.map",

0 commit comments

Comments
 (0)