From 73afdf00f09937cf0ac02c87163cec2e63219365 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 22:09:51 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20upgrade=20npm=20before=20publish=20?= =?UTF-8?q?=E2=80=94=20OIDC=20trusted=20publishing=20needs=20npm=20>=3D=20?= =?UTF-8?q?11.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v3.0.0 release run failed at the publish step with ENEEDAUTH: every gate passed, but Node 22's bundled npm 10.9 predates npm trusted publishing, so the OIDC exchange never happened. Upgrading npm to latest in the publish step enables the trusted-publisher flow (no token needed; takes precedence), while an NPM_TOKEN secret keeps working as a fallback for the classic path. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013eq96Mbqa2dBCAN3YCyrDK --- .github/workflows/publish.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3fba30f..074bd42 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -58,6 +58,13 @@ jobs: node --unhandled-rejections=strict smoke.mjs - name: Publish with provenance - run: npm publish --provenance --access public + # npm >= 11.5 is required for OIDC trusted publishing (the "connect a + # GitHub repo" flow on npmjs.com); Node 22 ships npm 10.x. With a + # trusted publisher configured, no token is needed — OIDC takes + # precedence. A classic NPM_TOKEN secret keeps working as a fallback. + run: | + npm install -g npm@latest + npm --version + npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}