fix(ci): scope Electron native rebuilds (#1099)

This commit is contained in:
Tommaso Casaburi
2026-03-17 18:22:56 +08:00
committed by GitHub
parent 1db0c625e8
commit 2c276f05eb
3 changed files with 9 additions and 2 deletions
+4
View File
@@ -253,6 +253,7 @@ jobs:
ls -la build/index.html || exit 1
- name: Rebuild and verify Electron native modules
timeout-minutes: 10
run: yarn electron:prepare-package
- name: Package Electron app
@@ -318,6 +319,7 @@ jobs:
ls -la build/index.html || exit 1
- name: Rebuild and verify Electron native modules
timeout-minutes: 10
run: yarn electron:prepare-package
- name: Package Electron app
@@ -383,6 +385,7 @@ jobs:
ls -la build/index.html || exit 1
- name: Rebuild and verify Electron native modules
timeout-minutes: 10
run: yarn electron:prepare-package
- name: Package Electron app
@@ -450,6 +453,7 @@ jobs:
- name: Rebuild and verify Electron native modules
shell: bash
timeout-minutes: 10
run: yarn electron:prepare-package
- name: Package Electron app
+4 -1
View File
@@ -46,7 +46,10 @@ const config = {
},
rebuildConfig: {
force: true,
// Only better-sqlite3 is intentionally prepared and verified before packaging.
// Using `onlyModules` prevents Forge from rebuilding unrelated optional addons
// that inflate Windows package times.
onlyModules: ['better-sqlite3'],
},
hooks: {
+1 -1
View File
@@ -62,7 +62,7 @@
"electron:no-delete-data": "yarn build:preload && electron .",
"electron:start": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://5chan.localhost:1355 && yarn electron\"",
"electron:start:no-delete-data": "concurrently \"cross-env BROWSER=none yarn start\" \"wait-on http://5chan.localhost:1355 && yarn electron:no-delete-data\"",
"electron:rebuild-native": "electron-rebuild -f -w better-sqlite3",
"electron:rebuild-native": "electron-rebuild -f -o better-sqlite3",
"electron:verify-native": "node scripts/verify-electron-native-modules.js",
"electron:prepare-package": "yarn electron:rebuild-native && yarn electron:verify-native",
"electron:package": "yarn build && yarn build:preload && yarn electron:prepare-package && electron-forge package",