diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9ba8f7d..0e3e933 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,14 @@ jobs: - uses: actions/checkout@v6 - name: Set up Node.js + # Pinned to 22 (not 24): electron-forge 7.11.2 (latest stable) silently + # fails to run the makers under Node 24.x — `make` stops after packaging + # and emits no .dmg/.zip, so the release produces no installers. Node 22 + # builds them correctly. Revisit when a stable electron-forge supports + # Node 24 (only 8.0.0-alpha does today). uses: actions/setup-node@v6 with: - node-version: '24' + node-version: '22' - name: Set version in package.json run: npm version ${{ inputs.version }} --no-git-tag-version diff --git a/CHANGES/2026-06-04_ci-release-node-22.md b/CHANGES/2026-06-04_ci-release-node-22.md new file mode 100644 index 0000000..759dad9 --- /dev/null +++ b/CHANGES/2026-06-04_ci-release-node-22.md @@ -0,0 +1,43 @@ +# ci: pin release build to Node 22 (real fix for empty release artifacts) + +**Date:** 2026-06-04 +**Type:** CI + +## Intent +The v0.0.20 release produced no installers: the macOS build jobs succeeded but +emitted no `.dmg`/`.zip`, so "Create Release" failed downloading missing +artifacts. Root cause (reproduced locally both ways): **electron-forge 7.11.2 +(latest stable) silently fails under Node 24.x** — `electron-forge make` runs the +package phase, stops at "Finalizing package", never runs the makers, and exits 0 +with an empty `out/make`. Under **Node 22** the same code + deps produce the +dmg/zip. The earlier electron 42→41 pin (#119) was a misdiagnosis: electron was +never the cause (v0.0.19 shipped on electron 42.2.0); both 41 and 42 build fine +on Node 22 and both fail on Node 24. + +`ci.yml` never runs `electron-forge make`, so this only surfaced at release time. +No stable electron-forge supports Node 24 yet (only 8.0.0-alpha targets it), so +pinning the release build to Node 22 is the robust fix. + +### Prompts summary +1. After two failed release attempts, investigated the Node 24 packaging break and chose to pin the release build to Node 22 and restore electron to ^42. + +## Changes + +### `.github/workflows/release.yml` +- Build job `setup-node` `node-version` `'24'` → `'22'` (with a comment explaining why). + +### `package.json` / `package-lock.json` +- Restore `electron` `^41.7.1` → `^42.0.0` (reverts the #119 pin; resolves 42.3.3). + +## Verification +- Locally, `npm ci` + `npx electron-forge make --arch=arm64` on **Node 22 + + electron 42.3.3** runs both makers and produces `out/make/PapaStudio.dmg` and + the arm64 zip. On Node 24 the same setup produces nothing. + +## Files modified + +| File | Change | +|------|--------| +| `.github/workflows/release.yml` | Pin release build to Node 22 | +| `package.json` | Restore `electron` to `^42.0.0` | +| `package-lock.json` | Regenerated for electron 42.3.3 | diff --git a/package-lock.json b/package-lock.json index 57a150b..bb52a9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@electron-forge/maker-dmg": "^7.11.1", "@electron-forge/maker-zip": "^7.11.1", "@playwright/test": "1.60.0", - "electron": "^42.0.0" + "electron": "^42.3.3" } }, "node_modules/@electron-forge/cli": { diff --git a/package.json b/package.json index af93afc..df3c9a9 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,6 @@ "@electron-forge/maker-dmg": "^7.11.1", "@electron-forge/maker-zip": "^7.11.1", "@playwright/test": "1.60.0", - "electron": "^42.0.0" + "electron": "^42.3.3" } }