From 9f51d43ddf6c09c3c9f553f86d02f4c0bb384c57 Mon Sep 17 00:00:00 2001 From: Phil Leggetter Date: Thu, 30 Jul 2026 11:26:27 +0100 Subject: [PATCH] fix(release): run npm publish job on Node 22 so npm@latest installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish-npm job pinned Node 20 and then ran `npm install -g npm@latest`. npm@12 dropped Node 20 support (requires Node ^22.22 || ^24.15 || >=26), so the upgrade aborts with EBADENGINE before `npm publish` runs — which is why v2.3.0 built and released everywhere (GitHub artifacts, Homebrew, Scoop, Docker) but was never published to npm. `npm publish --provenance` needs a recent npm, so the fix is to run this job on Node 22.x rather than downgrade npm. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_016QCuRsTPjpi6hbu9WSaE5J --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a52a48e..70a15309 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,9 +106,12 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "22.x" registry-url: "https://registry.npmjs.org" + # npm@latest now requires Node >= 22.22 (it dropped Node 20 support), and + # `npm publish --provenance` (OIDC) needs a recent npm, so this job runs on + # Node 22.x rather than 20.x. - name: Upgrade npm to latest version run: npm install -g npm@latest