Skip to content

Commit b8bb853

Browse files
committed
fix(release): remove any npm tokens
1 parent c392a76 commit b8bb853

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ jobs:
3030
node-version: 'lts/*'
3131
registry-url: 'https://registry.npmjs.org'
3232

33+
- name: Ensure OIDC-only npm auth (no tokens)
34+
run: |
35+
# Remove any committed or inherited npm token configuration
36+
rm -f .npmrc ~/.npmrc
37+
npm config delete //registry.npmjs.org/:_authToken || true
38+
npm config delete _authToken || true
39+
npm config delete token || true
40+
41+
# Defensive: if your repo/org still has these secrets, make sure they are not used
42+
echo "NPM_TOKEN is: ${NPM_TOKEN:+set}" || true
43+
echo "NODE_AUTH_TOKEN is: ${NODE_AUTH_TOKEN:+set}" || true
44+
env:
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
47+
3348
- name: Install dependencies
3449
run: npm ci
3550

0 commit comments

Comments
 (0)