Skip to content

ci: publish to npm with trusted publishing - #7

Merged
nlemoine merged 1 commit into
mainfrom
ci/npm-trusted-publishing
Oct 2, 2026
Merged

nlemoine merged 1 commit into
mainfrom
ci/npm-trusted-publishing

Conversation

@nlemoine

@nlemoine nlemoine commented Oct 2, 2026

Copy link
Copy Markdown
Owner

The publish job for 3.0.1 failed with E404 on npm publish. The NPM_TOKEN secret is a classic token from 2021, npm does not accept it anymore.

Changes:

  • publish with npm trusted publishing (OIDC): id-token: write and plain npm publish, JS-DevTools/npm-publish and NPM_TOKEN are removed
  • publish job runs on Node 24 because trusted publishing needs npm 11.5.1+ (Node 22 ships npm 10.9). engines stays >=22.
  • workflow_dispatch added, publish also runs on manual runs. Needed to publish 3.0.1 since the GitHub release already exists.

Trusted publisher is configured on npmjs.com for this repo and release.yml.

After merge: gh workflow run release.yml to publish 3.0.1, then delete the NPM_TOKEN secret.

actionlint and zizmor are clean.

The NPM_TOKEN secret is a classic token from 2021 that npm no longer
accepts, so publishing 3.0.1 failed with E404.

- publish with OIDC (id-token: write) and plain npm publish
- use Node 24 in the publish job, it bundles npm 11.5.1+ which
  trusted publishing requires
- allow manual runs so a release can be republished
@nlemoine
nlemoine merged commit d7fc1fe into main Oct 2, 2026
@nlemoine
nlemoine deleted the ci/npm-trusted-publishing branch October 2, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant