Review the path from GitHub Actions to npm

Separate the person who approves a release from the workflow that publishes it. Rehearse the handoff before changing a real package.

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

Shared or checked
GitHub Actions passes a publishing identity to npm. npm matches the repository and workflow against its trusted publisher settings.
Check separately
Check release approval in the workflow and check who can publish through any other configured credentials.

Who does what

Repository maintainer
Chooses the workflow and release environment, and starts a run for the intended revision.
Environment reviewer
Approves or denies the GitHub environment deployment if required reviewers are available and configured.
Package administrator
Configures the npm trusted publisher and can correct its repository, workflow or environment. Keep this access available during the test.
Publishing job
Uses the workflow’s configured publishing identity. Check its output against the version npm received.
  1. 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.

  2. 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.

  3. 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.

Verify an approval and its result

How to verify your setup

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.

Report a problem with this guide

Explore all setup guides →