Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/action-deploy-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@ jobs:
# token to install this.
- name: Publish to npm
uses: JS-DevTools/npm-publish@v4
env:
# setup-node writes `_authToken=${NODE_AUTH_TOKEN}` into the job's
# .npmrc and exports a placeholder value when nothing supplies one.
# npm then presents that placeholder as a credential and fails with
# ENEEDAUTH rather than falling back to the OIDC exchange trusted
# publishing relies on. Binding it to the secret keeps a real token
# working while leaving it empty when there is none, which is what
# lets npm reach for OIDC.
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
provenance: true
access: public
ignore-scripts: true
# Not required with trusted publishing; empty falls through to OIDC.
token: ${{ secrets.NPM_TOKEN }}
Loading