Migrate to OIDC Trusted Publishing #36
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem are we solving?
With OIDC Trusted Publishing, GHA authenticates directly with npm using short-lived identity tokens instead.
Why solve it this way?
This PR migrates our semantic-release workflow to use OIDC Trusted Publishing for npm releases. Previously, our release pipeline required an
npm-tokensecret to authenticate with npm during publishing. This approach has since been discouraged by npm themselves.Fixes:
npm-tokenas a required secret, allowing us to remove that input so GHA knows to publish via OIDC Trusted Publishing.id-token: writepermissions to the workflow to allow for GHA to request an OIDC token at runtime.semantic-release-action/typescript/release.yml@v3.1.0Testing:
From our test/check logs, we can confirm that OIDC is being used instead of an npm token to establish a connection to npm.
As confirmation of a successful release, see the beta pre-release tag that was created in the repo and in npmjs: https://www.npmjs.com/package/@bitgo-forks/io-ts/v/2.1.5-beta.1

https://github.com/BitGo/io-ts/actions/runs/19077165991
*Note: this PR should not trigger a new official release to
@bitgo-forks/io-ts*