Skip to content

chore(deps): bump semantic-release to 25 for npm trusted publishing#1029

Merged
pgoodjohn merged 1 commit into
commitizen:masterfrom
pgoodjohn:fix/upgrade-semantic-release-for-oidc
Jun 12, 2026
Merged

chore(deps): bump semantic-release to 25 for npm trusted publishing#1029
pgoodjohn merged 1 commit into
commitizen:masterfrom
pgoodjohn:fix/upgrade-semantic-release-for-oidc

Conversation

@pgoodjohn

@pgoodjohn pgoodjohn commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1025.

Follow-up to #1028. After granting id-token: write and dropping NPM_TOKEN, the release run still failed with ENONPMTOKEN: https://github.com/commitizen/cz-cli/actions/runs/27406345627/job/80996318512

Root cause: the repo was pinned to semantic-release@19.0.5, which pulls in @semantic-release/npm@9.0.1 (2022). That plugin version has no concept of npm trusted publishing — its verifyConditions step hard-requires NPM_TOKEN and exits before npm ever gets a chance to mint an OIDC credential.

Trusted publishing support was added in @semantic-release/npm@12.0.2 (Oct 2025), which requires semantic-release >= 24.

This bumps semantic-release to 25.0.5, which transitively pulls in:

  • @semantic-release/npm@13.1.5 (supports OIDC)
  • @semantic-release/github@12.0.8

No other plugin config changes were needed — the existing release block in package.json (preset: conventionalcommits) still works.

Notes

  • semantic-release@25 requires Node ^22.14.0 || >= 24.10.0. The release workflow uses node-version: lts/*, which currently resolves to Node 22 — fine. The engines field in package.json (>= 18) is left untouched since it constrains end-user installs of commitizen, not the release pipeline.

Test plan

  • Merge to master and confirm the next release run gets past verifyConditions and publishes via OIDC (look for provenance lines in the publish output).
  • Confirm the published version on npm shows the provenance badge.

@semantic-release/npm gained support for npm trusted publishing (OIDC)
in v12.0.2, which requires semantic-release >= 24. The previous pin of
semantic-release@19.0.5 / @semantic-release/npm@9.0.1 hard-failed in
verifyConditions with ENONPMTOKEN before npm ever got a chance to use
the OIDC flow configured on the registry.

This upgrade pulls in @semantic-release/npm@13 and
@semantic-release/github@12 transitively, so the release workflow can
finally authenticate via OIDC.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pgoodjohn pgoodjohn merged commit 6eb168c into commitizen:master Jun 12, 2026
10 checks passed
@pgoodjohn pgoodjohn deleted the fix/upgrade-semantic-release-for-oidc branch June 12, 2026 12:50
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.3.2 🎉

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.

The automated release is failing 🚨

1 participant