Skip to content

Commit 1ce0ac4

Browse files
authored
chore: switch to Trusted Publishing for npm (remove NPM_TOKEN) (#19)
Use OIDC-based Trusted Publishing instead of long-lived tokens. More secure: no secrets to manage, automatic GitHub authentication. npm will authenticate via GitHub Actions OIDC token automatically. The 'id-token: write' permission enables this.
1 parent c381ef1 commit 1ce0ac4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ jobs:
8585
echo "✅ Version $PACKAGE_VERSION is new. Ready to publish!"
8686
fi
8787
88-
# 9. Publish to npm
88+
# 9. Publish to npm (using Trusted Publishing via OIDC)
8989
- name: Publish to npm
9090
run: npm publish --provenance --access public
91-
env:
92-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9391

9492
# 10. Success message
9593
- name: Success notification

0 commit comments

Comments
 (0)