From 1c561f0eaf4a62a760e27fad4a8bd749976c52ff Mon Sep 17 00:00:00 2001 From: Nate Sesti <33237525+sestinj@users.noreply.github.com> Date: Sun, 1 Mar 2026 13:25:30 -0800 Subject: [PATCH] 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 --- .github/workflows/beta-release.yml | 12 +++++------- .github/workflows/stable-release.yml | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index a54195681..9187cc329 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -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 diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 310a2a0ec..fce6cc22c 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -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