feat(ci): use patched Linux Electron from GitHub release
Build and Release / build-and-release (push) Failing after 3m51s

Rewrite download-electron.js to download both Windows (v42) and
Linux (v43) patched binaries from bigjakk/Electron-Websocket-Fix,
matching KPC's multi-platform approach. On CI, binaries go to
dist-win/ and dist-linux/; locally the current platform replaces
dist/. Both platforms now use the patched Electron.
This commit is contained in:
2026-04-03 18:05:16 -07:00
parent 11b585d409
commit 21e402b9d3
2 changed files with 195 additions and 191 deletions
+1 -13
View File
@@ -56,18 +56,6 @@ jobs:
if: steps.version-check.outputs.SKIP == 'false'
run: npm ci --legacy-peer-deps
- name: Ensure Electron Linux binary
if: steps.version-check.outputs.SKIP == 'false'
run: |
if [ ! -f node_modules/electron/dist/electron ]; then
echo "Electron Linux binary not found in dist/, triggering download..."
node node_modules/electron/install.js
fi
echo "=== Electron binaries ==="
echo "dist/electron: $(ls -lh node_modules/electron/dist/electron 2>/dev/null || echo MISSING)"
echo "dist-win/electron.exe: $(ls -lh node_modules/electron/dist-win/electron.exe 2>/dev/null || echo MISSING)"
echo "path.txt: $(cat node_modules/electron/path.txt 2>/dev/null || echo MISSING)"
- name: Build source
if: steps.version-check.outputs.SKIP == 'false'
run: npm run build
@@ -80,7 +68,7 @@ jobs:
- name: Build Linux distributables
if: steps.version-check.outputs.SKIP == 'false'
run: npx electron-builder --linux -c.electronDist=node_modules/electron/dist --publish never
run: npx electron-builder --linux -c.electronDist=node_modules/electron/dist-linux --publish never
- name: Report build sizes
if: steps.version-check.outputs.SKIP == 'false'