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
13 changes: 10 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ jobs:
exit 1
fi

# No token: id-token above lets the CLI exchange a short-lived OIDC
# credential with npm. Provenance is generated automatically for a public
# package from a public repo, so --provenance is not needed either.
# Bootstrap auth. Trusted publishing (OIDC) is the destination and needs no
# token, but it is configured on a PACKAGE — which cannot exist until it
# has been published once. So the first release authenticates with a token;
# once the package exists, the trusted publisher is configured, this env
# block is deleted, and the token is revoked.
#
# Provenance still works here: `id-token: write` above is what npm needs to
# attest the build, and that is independent of how the publish authenticates.
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading