fix: use CUSTOM_APP_BUILDER_PATH to resolve app-builder binary in CI

app-builder-bin/index.js supports CUSTOM_APP_BUILDER_PATH env var which
overrides the default binary resolution. Set this explicitly on both
Linux build steps to ensure electron-builder finds the binary regardless
of working directory or npm workspace hoisting quirks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
SRS IT
2026-03-29 11:20:29 -04:00
parent c5501c945f
commit 2e9dade24f
+3 -17
View File
@@ -41,6 +41,7 @@ jobs:
tar -xzf /tmp/app-builder.tar.gz -C "$(dirname $BINARY)" tar -xzf /tmp/app-builder.tar.gz -C "$(dirname $BINARY)"
fi fi
chmod +x "$BINARY" chmod +x "$BINARY"
echo "Binary: $GITHUB_WORKSPACE/$BINARY"
"$BINARY" --version "$BINARY" --version
- name: Vite build - name: Vite build
@@ -51,29 +52,13 @@ jobs:
run: node scripts/bundle-standalone.js run: node scripts/bundle-standalone.js
working-directory: apps/desktop working-directory: apps/desktop
- name: Diagnose app-builder path from desktop context
run: |
node -e "
const p = require('./node_modules/app-builder-bin');
console.log('appBuilderPath:', p.appBuilderPath);
const fs = require('fs');
const exists = fs.existsSync(p.appBuilderPath);
console.log('file exists:', exists);
if (exists) {
const stat = fs.statSync(p.appBuilderPath);
console.log('mode:', stat.mode.toString(8));
console.log('size:', stat.size);
}
"
find /home/runner/work -name "app-builder" -not -path "*/proc/*" 2>/dev/null
working-directory: apps/desktop
- name: Build Linux x64 packages - name: Build Linux x64 packages
run: npx electron-builder --linux --x64 run: npx electron-builder --linux --x64
working-directory: apps/desktop working-directory: apps/desktop
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: "false" CSC_IDENTITY_AUTO_DISCOVERY: "false"
CUSTOM_APP_BUILDER_PATH: ${{ github.workspace }}/node_modules/app-builder-bin/linux/x64/app-builder
- name: Build Linux arm64 packages - name: Build Linux arm64 packages
run: npx electron-builder --linux --arm64 run: npx electron-builder --linux --arm64
@@ -81,6 +66,7 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: "false" CSC_IDENTITY_AUTO_DISCOVERY: "false"
CUSTOM_APP_BUILDER_PATH: ${{ github.workspace }}/node_modules/app-builder-bin/linux/x64/app-builder
- name: List build output - name: List build output
run: ls -lh apps/desktop/dist/ run: ls -lh apps/desktop/dist/