From d8c32b438f7232194bd6a9140782d65402d53126 Mon Sep 17 00:00:00 2001 From: SRS IT Date: Sun, 29 Mar 2026 12:10:20 -0400 Subject: [PATCH] fix: install app-builder to system PATH, use USE_SYSTEM_APP_BUILDER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The binary disappears from node_modules between the verify step and the electron-builder step (likely re-installed/cleared during dep scan). Install it to /usr/local/bin/ and use USE_SYSTEM_APP_BUILDER=true so electron-builder looks it up by name in PATH — bypassing all path resolution and caching issues. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/build-linux.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 1caa2c1..c70da81 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -29,20 +29,16 @@ jobs: - name: Install workspace dependencies run: npm install --legacy-peer-deps - - name: Ensure app-builder binary + - name: Install app-builder to system PATH run: | - BINARY="node_modules/app-builder-bin/linux/x64/app-builder" - if [ ! -f "$BINARY" ]; then - VERSION=$(node -e "console.log(require('./node_modules/app-builder-bin/package.json').version)") - echo "Downloading app-builder $VERSION" - mkdir -p "$(dirname $BINARY)" - curl -fL "https://github.com/develar/app-builder/releases/download/v${VERSION}/app-builder_${VERSION}_linux_amd64.tar.gz" \ - -o /tmp/app-builder.tar.gz - tar -xzf /tmp/app-builder.tar.gz -C "$(dirname $BINARY)" - fi - chmod +x "$BINARY" - echo "Binary: $GITHUB_WORKSPACE/$BINARY" - "$BINARY" --version + VERSION=$(node -e "console.log(require('./node_modules/app-builder-bin/package.json').version)") + echo "Downloading app-builder $VERSION" + curl -fL "https://github.com/develar/app-builder/releases/download/v${VERSION}/app-builder_${VERSION}_linux_amd64.tar.gz" \ + -o /tmp/app-builder.tar.gz + tar -xzf /tmp/app-builder.tar.gz -C /tmp/ + chmod +x /tmp/app-builder + sudo mv /tmp/app-builder /usr/local/bin/app-builder + app-builder --version - name: Vite build run: npx electron-vite build @@ -58,7 +54,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: "false" - CUSTOM_APP_BUILDER_PATH: ${{ github.workspace }}/node_modules/app-builder-bin/linux/x64/app-builder + USE_SYSTEM_APP_BUILDER: "true" - name: Build Linux arm64 packages run: npx electron-builder --linux --arm64 @@ -66,7 +62,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: "false" - CUSTOM_APP_BUILDER_PATH: ${{ github.workspace }}/node_modules/app-builder-bin/linux/x64/app-builder + USE_SYSTEM_APP_BUILDER: "true" - name: List build output run: ls -lh apps/desktop/dist/