Skip to content

Conversation

tanjeemh
Copy link

@tanjeemh tanjeemh commented Oct 10, 2025

Summary:
This PR updates the GitHub Actions release workflow to use npm Trusted Publishing (OIDC) instead of long-lived NPM_TOKEN secrets.

Changes:

  • Added permissions: id-token: write for OIDC-based publishing.
  • Removed NPM_TOKEN from the release job.

Why:
This change aligns with BitGo’s initiative to eliminate long-lived tokens and use GitHub’s OIDC-based authentication for npm publishing.
Trusted Publishers were configured in npmjs for all relevant repos.

Expected outcome:

  • Future releases will publish securely through GitHub’s OIDC workflow.
  • NPM_TOKEN secrets are no longer required.
  • npm packages will show “Verified provenance” badges after the next release.

Ticket: DX-2084

@tanjeemh tanjeemh requested a review from a team as a code owner October 10, 2025 19:09
Copy link

@ericcrosson-bitgo ericcrosson-bitgo left a comment

Choose a reason for hiding this comment

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

The PR description seems out of date -- for example, it mentions we install npm though I don't see that in the diff. Please review for consistency with the implementation.

uses: semantic-release-action/typescript/.github/workflows/release.yml@1d40c29e2d500f3bcceeb13f95d26a3a1b571f51 # v3.0.20
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: "n/a"

Choose a reason for hiding this comment

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

What is this? Why is this variable set to a non-secret instead of being removed?

Copy link
Author

Choose a reason for hiding this comment

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

When I completely removed it, I was getting a "missing npm token" error.
I'm assuming the version of semantic release we are running expects there to be an npm token.
So to bypass this error I just added a dummy value - my apologies, I should have explained the reason why that was necessary.

Please let me know if you want me to approach this differently, thanks!

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.

2 participants