You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(release): publish via npm trusted publishing instead of a token
npm's token dialog warns that bypassing 2FA is a security risk and points
at Trusted Publishing. It is right: an automation token is a long-lived
credential sitting in repository secrets, and OIDC replaces it with an
identity check per run.
The workflow no longer sets NODE_AUTH_TOKEN and no NPM_TOKEN secret is
needed. --provenance is also dropped because provenance is automatic under
OIDC for a public package from a public repository.
Node moves to 24 in this job: trusted publishing needs npm >= 11.5.1 and
Node 22 still ships npm 10.x. npm is upgraded explicitly as well rather
than trusting whatever the runner image happens to bundle.
A trusted publisher can only be attached to a package that already exists,
so the checklist now has the first publish done by hand with an interactive
npm login — which honours 2FA and involves no token at all — and every
release after that running from CI.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments