diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 029be90..2c024b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -426,9 +426,10 @@ jobs: # first, and fail the build script when it is not. - name: Build NSIS Installer working-directory: ostp-gui - run: | - node stage-sidecar.js --release --target ${{ matrix.target }} - npx tauri build --bundles nsis --target ${{ matrix.target }} --config src-tauri/tauri.installer.conf.json + # Chained, not two lines: pwsh does not abort a run block when a native + # command fails, so a staging failure would otherwise be reported far + # downstream as a missing sidecar rather than as itself. + run: node stage-sidecar.cjs --release --target ${{ matrix.target }} && npx tauri build --bundles nsis --target ${{ matrix.target }} --config src-tauri/tauri.installer.conf.json - name: Collect installer shell: pwsh diff --git a/ostp-gui/package.json b/ostp-gui/package.json index f18eb49..e04fcda 100644 --- a/ostp-gui/package.json +++ b/ostp-gui/package.json @@ -7,9 +7,9 @@ "tauri": "tauri", "dev": "cargo build -p ostp-tun-helper && npx tauri dev", "build": "cargo build -p ostp-tun-helper --release && npx tauri build --no-bundle", - "build:installer": "cargo build -p ostp-tun-helper --release && node stage-sidecar.js --release && npx tauri build --bundles nsis --config src-tauri/tauri.installer.conf.json", + "build:installer": "cargo build -p ostp-tun-helper --release && node stage-sidecar.cjs --release && npx tauri build --bundles nsis --config src-tauri/tauri.installer.conf.json", "build:dist": "npm run build && node build_dist.js", - "sidecar": "node stage-sidecar.js" + "sidecar": "node stage-sidecar.cjs" }, "devDependencies": { "@tauri-apps/cli": "^2" diff --git a/ostp-gui/stage-sidecar.js b/ostp-gui/stage-sidecar.cjs similarity index 100% rename from ostp-gui/stage-sidecar.js rename to ostp-gui/stage-sidecar.cjs