From d8b896cd4ca1341e0ca25ce86adab92c41ab246f Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Thu, 9 Jul 2026 17:28:36 -0700 Subject: [PATCH] fix(ci): pin npm to 11.6.2 so publish-npm runs on Node 20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish-npm job runs `npm install -g npm@latest` on a Node 20 runner. npm@latest is now 12.0.0, which requires Node >=22, so the step fails with EBADENGINE and @trycourier/cli never publishes (stuck at 3.10.1 while the Go binaries/GitHub release ship fine via goreleaser). Pin npm to 11.6.2 — the newest line that still supports Node 20 (engines: node ^20.17.0 || >=22) while retaining OIDC trusted publishing support (added in npm 11.5.1). This mirrors what courier-node's publish path uses. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/publish-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 267bb2b..726168c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -47,7 +47,10 @@ jobs: node-version: "20" registry-url: "https://registry.npmjs.org" - name: Update npm - run: npm install -g npm@latest + # npm@latest (>=12) requires Node >=22 and breaks on this Node 20 runner + # (EBADENGINE). Pin to 11.6.2: the newest line that still supports Node 20 + # (engines: node ^20.17.0 || >=22) and OIDC trusted publishing (npm >=11.5.1). + run: npm install -g npm@11.6.2 - name: Set package version from tag working-directory: npm run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version