Skip to content

Commit 1d8ba3b

Browse files
nam-hleclaude
andcommitted
fix: strip _authToken from .npmrc for OIDC trusted publishing
setup-node with registry-url creates .npmrc with _authToken placeholder that prevents npm from using OIDC authentication. Delete the auth token entry before publish so npm falls through to the OIDC flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 988fda1 commit 1d8ba3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,17 @@ jobs:
3535
- name: Build
3636
run: nadle build
3737

38+
- name: Setup npm for trusted publishing
39+
if: ${{ !startsWith(github.ref_name, 'vscode-extension/') }}
40+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
41+
with:
42+
registry-url: https://registry.npmjs.org
43+
3844
- name: Publish to npm
3945
if: ${{ !startsWith(github.ref_name, 'vscode-extension/') }}
40-
run: npm publish --provenance --access public
46+
run: |
47+
npm config delete //registry.npmjs.org/:_authToken
48+
npm publish --provenance --access public
4149
working-directory: packages/${{ steps.parse-tag.outputs.package }}
4250

4351
- name: Publish VS Code Extension

0 commit comments

Comments
 (0)