Skip to content

ci: add NPM OIDC trusted publishing to release pipeline - #136

Merged
manast merged 2 commits into
masterfrom
copilot/ci-add-support-for-npm-oidc
Jul 24, 2026
Merged

ci: add NPM OIDC trusted publishing to release pipeline#136
manast merged 2 commits into
masterfrom
copilot/ci-add-support-for-npm-oidc

Conversation

Copilot AI commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The release pipeline fails to publish because npm no longer accepts classic long-lived tokens and requires OIDC trusted publishing. This updates the release workflow to authenticate via OIDC.

Changes (.github/workflows/release.yml)

  • Grant OIDC permission — added id-token: write to the release job so Actions can mint the short-lived identity token npm uses to authenticate.
  • Upgrade npm — added npm install -g npm@latest before the release step; OIDC trusted publishing requires npm ≥ 11.5.1, newer than the version bundled with lts/* Node.
  • Drop token auth — removed NPM_TOKEN from the Release step env, since it's obsolete under OIDC and a lingering token can conflict with OIDC auth.
permissions:
  contents: write
  pull-requests: write
  issues: write
  id-token: write # for NPM OIDC trusted publishing

The locked @semantic-release/npm@12.0.2 already supports OIDC, so no dependency changes were needed.

Follow-up (npm registry, outside this repo)

The package must be registered as a Trusted Publisher on npmjs.com (Package → Settings → Trusted Publishers) for taskforcesh/taskforce-connector with workflow release.yml. This one-time registry-side setup is required for publishes to succeed.

Copilot AI linked an issue Jul 24, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add support for NPM OIDC in release pipeline ci: add NPM OIDC trusted publishing to release pipeline Jul 24, 2026
Copilot AI requested a review from manast July 24, 2026 13:04
@manast
manast marked this pull request as ready for review July 24, 2026 13:11
Copilot AI review requested due to automatic review settings July 24, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release GitHub Actions workflow to publish to npm using OIDC trusted publishing (instead of long-lived npm tokens), addressing the current publish failures.

Changes:

  • Granted id-token: write permission to allow minting an OIDC token for npm.
  • Added a step to update npm before running semantic-release.
  • Removed NPM_TOKEN from the release step environment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@manast
manast merged commit 8edbd25 into master Jul 24, 2026
5 checks passed
@manast
manast deleted the copilot/ci-add-support-for-npm-oidc branch July 24, 2026 19:28
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.38.0 🎉

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.

ci: add support for NPM OIDC

4 participants