Skip to content

Conversation

@G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Oct 22, 2025

This switches us to using trusted publishing aka OIDC for authenticating with the NPM registry to publish releases, rather than long-lived access tokens.

This is more secure and will become all but required for CI-based releases, as publishing tokens will have a max expiration of 90 days.

Because of the magic that is OIDC this should "just work" 🤞

@G-Rath G-Rath requested a review from SimenB October 22, 2025 19:03
@G-Rath
Copy link
Collaborator Author

G-Rath commented Oct 22, 2025

@SimenB you'll need to set up the trusted publisher on the npm package - I believe this is the setup to use:

image

@SimenB
Copy link
Member

SimenB commented Oct 29, 2025

@SimenB you'll need to set up the trusted publisher on the npm package

I did that a couple of weeks ago, so this repo should be good to go

Comment on lines 166 to 167
- name: install latest npm
run: npm i -g npm
Copy link
Member

Choose a reason for hiding this comment

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

do we need to install it ourselves? semantic-release depends on npm, so I would've thought it pulled it in for us

https://github.com/semantic-release/npm/blob/14c1fc8b7626d0f4e4875fa93664ebca4068757b/package.json#L31

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah nice, I hadn't realized that - I would still prefer keeping this for now though to be extra sure since it doesn't cost us anything and we don't have a lot of releases these days so it could be a while before we realize there's an issue with publishing

Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer a quick test release (can be a next branch) for the OIDC stuff anyways, so testing without installing npm manually seems good? the less config the better 😀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all good but in that case would you mind actioning that? as the last time I tried doing a next branch things went pear shaped 😅

Copy link
Member

Choose a reason for hiding this comment

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

@G-Rath G-Rath marked this pull request as ready for review October 29, 2025 19:26
@SimenB SimenB merged commit 108129d into main Oct 31, 2025
14 of 15 checks passed
@SimenB SimenB deleted the ci/use-oidc branch October 31, 2025 08:46
@github-actions
Copy link

🎉 This PR is included in version 29.0.2-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@SimenB
Copy link
Member

SimenB commented Oct 31, 2025

Since it worked ( 🎉 ) I've deleted the old secret from the repo

@github-actions
Copy link

🎉 This PR is included in version 29.1.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants