Before you start
- Use a disposable npm package and a workflow on a GitHub-hosted runner with Node.js 22.14.0 or later and npm 11.5.1 or later.
- Have permission to edit the package’s trusted publisher and configure the repository environment. Required reviewers on Free, Pro and Team are available for public repositories.
- Check GitHub Actions availability
- Check npm availability
Data and access
Who does what
Confirm the publishing identity
Choose a disposable package. Use npm's trusted publishing guide to identify which repository, workflow and environment are allowed to publish it.
Check. The trusted publisher lists the test repository and workflow filename, plus the environment if one is configured.
Review the release approval
Check who can change the release workflow and whether your GitHub plan allows the environment approval you need. Confirm how an authorized reviewer approves or denies the run.
Check. The test run waits for review before entering the publishing job. Check who reviewed it in the workflow run.
Verify the published result
After a test release, compare the package version and commit with the intended release and inspect the package's provenance when available.
Check. The registry shows the intended version. If it displays provenance, open it and compare the listed source with the run you reviewed.
Check your result
A KeySigner rule used by a human maintainer covers only the operations that actually require it. Keep the package's publishing trust configuration in place.
If you get stuck
Publishing is denied
Compare the owner, repository, workflow filename and environment in npm’s trusted publisher settings with the workflow that ran. Confirm the publishing job can request an identity token.