File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ jobs:
141141 # npm publish uses OIDC (id-token: write + --provenance). No NPM_TOKEN needed.
142142 # Require on npmjs.com: Package → Package settings → Trusted publishers →
143143 # Add: GitHub Actions, org cloudinary-devs, repo create-cloudinary-react, workflow release.yml
144+ # npm trusted publishing (OIDC) requires npm CLI 11.5.1+; Node 20 ships with npm 9.x.
144145 # Force OIDC-only: override NPM_CONFIG_USERCONFIG so npm ignores setup-node's .npmrc (which may reference a stale token).
145146 - name : Publish to npm using trusted publishing
146147 if : github.event.inputs.dry_run != 'true'
@@ -153,6 +154,9 @@ jobs:
153154 unset NODE_AUTH_TOKEN NPM_TOKEN 2>/dev/null || true
154155 # Config that has only registry — no _authToken — so npm uses OIDC
155156 echo "registry=https://registry.npmjs.org/" > "$NPM_CONFIG_USERCONFIG"
157+ # OIDC for publish requires npm 11.5.1+ (Node 20 ships with npm 9.x)
158+ npm install -g npm@latest
159+ npm --version
156160
157161 # Get versions
158162 VERSION_BEFORE="${{ steps.version-before.outputs.version }}"
You can’t perform that action at this time.
0 commit comments