Fix npm OIDC publish by removing setup-node registry config (#10958)

Fix npm publish by removing setup-node registry config that blocks OIDC

setup-node with registry-url sets NODE_AUTH_TOKEN to the GitHub token,
which npm uses instead of its OIDC flow, causing auth failures. Remove
registry-url/always-auth and switch beta workflow to OIDC too.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nate Sesti 2026-03-01 13:25:30 -08:00 • committed by GitHub
parent 96bb0eac22
commit 1c561f0eaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 9 deletions

View file

@ -11,6 +11,7 @@ permissions:
contents: write
issues: write
pull-requests: write
id-token: write # Required for npm OIDC trusted publishing
jobs:
beta-release:
@ -29,8 +30,6 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Setup packages
uses: ./.github/actions/setup-packages
@ -46,11 +45,12 @@ jobs:
cd core
npm run build
- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest
- name: Install CLI dependencies
working-directory: extensions/cli
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get current version
id: get_version
@ -94,10 +94,8 @@ jobs:
- name: Publish beta to npm
working-directory: extensions/cli
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --tag beta
npm publish --tag beta --provenance
echo "Published beta version: ${{ steps.get_version.outputs.beta_version }}"
- name: Create beta release on GitHub

View file

@ -43,8 +43,6 @@ jobs:
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Update npm for OIDC trusted publishing
run: npm install -g npm@latest