From a8a3d435fc5c37a09c3fd424a4bc76518c170e53 Mon Sep 17 00:00:00 2001 From: Manu Chaudhary Date: Thu, 17 Sep 2026 13:23:18 +0530 Subject: [PATCH] ci: fix OIDC publish on Node 20 and allow manual re-run `npm install -g npm@latest` now resolves to npm 12, which requires Node 22.22+/24.15+ and failed the v5.5.1 publish on the Node 20 runner. Pin npm to the 11 line (>= 11.5.1 is enough for trusted publishing) and run on Node 24. Add workflow_dispatch so a failed publish can be re-run from master without cutting a new tag. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/publish.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a67d024..515213b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,8 @@ name: Publish on: release: types: [published] + # Manual re-run from the default branch, e.g. when a release publish failed. + workflow_dispatch: jobs: publish: @@ -12,13 +14,17 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 - - name: Use Node.js 20.x + - name: Use Node.js 24.x uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x registry-url: https://registry.npmjs.org/ - name: Upgrade npm for OIDC trusted publishing - run: npm install -g npm@latest + # Trusted publishing needs npm >= 11.5.1. Pin the 11 line: npm@latest + # is now 12.x, which refuses to install on older Node runners. + run: | + npm install -g npm@11 + npm --version - name: NPM Publish run: | npm install