fix: use electronuserland/builder Docker image for Linux builds
The app-builder binary (electron-builder's internal tool) fails to spawn on plain ubuntu-latest runners due to missing shared libraries. The official electronuserland/builder Docker image has all required dependencies pre-installed and is the recommended build environment. This eliminates the ENOENT spawn error entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: electronuserland/builder:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -23,22 +25,11 @@ jobs:
|
||||
|
||||
- name: Install Linux build tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y rpm fakeroot dpkg libarchive-tools
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq rpm fakeroot dpkg libarchive-tools
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --legacy-peer-deps
|
||||
env:
|
||||
npm_config_node_windows_skip_install: "true"
|
||||
|
||||
- name: Verify app-builder binary
|
||||
run: |
|
||||
BINARY="node_modules/app-builder-bin/linux/x64/app-builder"
|
||||
if [ ! -f "$BINARY" ]; then
|
||||
echo "Binary missing, running postinstall manually..."
|
||||
cd node_modules/app-builder-bin && node postinstall.js || true
|
||||
fi
|
||||
ls -lh $BINARY || echo "WARNING: app-builder binary still missing"
|
||||
|
||||
- name: Vite build
|
||||
run: npx electron-vite build
|
||||
|
||||
Reference in New Issue
Block a user