Skip to content

ci(release): publish to npm with trusted publishing (OIDC) - #275

Merged
pashidlos merged 1 commit into
masterfrom
ci/npm-trusted-publishing
Oct 24, 2026
Merged

pashidlos merged 1 commit into
masterfrom
ci/npm-trusted-publishing

Conversation

@pashidlos

Copy link
Copy Markdown
Member

The release job fails with EINVALIDNPMTOKEN: the NPM_TOKEN secret has expired (npm now limits token lifetimes). @semantic-release/npm 13.2.0, already in the lockfile, supports npm trusted publishing. It tries OIDC first and only falls back to NPM_TOKEN, so no long-lived token is needed and packages get provenance.

This PR only grants the job the permissions it needs: id-token: write for OIDC, plus contents, issues and pull-requests: write for @semantic-release/github.

Before merging: on npmjs.com, open the package → Settings → Trusted Publisher → GitHub Actions, and set organization Visual-Regression-Tracker, repository agent-cypress, workflow filename release.yml, environment empty.

🤖 Generated with Claude Code

Grant the release job id-token: write so @semantic-release/npm 13 can
publish through npm trusted publishing instead of the expired NPM_TOKEN,
plus the permissions @semantic-release/github needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pashidlos
pashidlos merged commit d986692 into master Oct 24, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant