Skip to content

Conversation

@travi
Copy link
Member

@travi travi commented Oct 16, 2025

todo before merging

  • handle dry-run of publish for releases that happen from a sub-directory
  • refine messaging for auth failure errors

outstanding issues after this effort

  • add-channel will fail because of lack of OIDC support this appears to no longer be true (update: maybe still not fully in the clear, with limited cases hitting issues that are on the registry side)
  • ci verification will not cover node v24. resolving this may warrant switching test frameworks, which is beyond the scope of adding trusted publishing capabilities

fixes #958

travi added 30 commits July 8, 2025 23:49
since oidc removes the need for the token

for #958
since oidc does not currently work for whoami

for #958
BREAKING CHANGE: v25 of semantic-release is now expected

for #958
…m various registriess

the trusted publishing verification is incomplete, but this change wires the various options
together, at least

for #958
…ge can succeed

this is the correct call, but details are still incomplete since the bearer token for the request
needs to be the OIDC token from the CI IdP

for #958
@travi travi marked this pull request as draft October 16, 2025 03:20
@travi
Copy link
Member Author

travi commented Oct 16, 2025

@semantic-release/maintainers feel free to start reviewing this. there are a few final details that need to be resolved, but this is mostly ready to go. i'd like to get this promoted by the end of the week

@github-actions
Copy link

🎉 This PR is included in version 13.1.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

travi added 2 commits October 18, 2025 09:38
now that the ordering of checks and fallbacks have been settled

for #958
@github-actions
Copy link

🎉 This PR is included in version 13.1.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@travi travi marked this pull request as ready for review October 18, 2025 15:31
@travi
Copy link
Member Author

travi commented Oct 18, 2025

@semantic-release/maintainers based on early feedback from #958 and my tests in https://github.com/travi-test/npm-oidc-test/ and our automated tests running in our pipeline, i'm ready to say this is ready for final review before promoting to stable.

the outstanding issues in the initial PR description have been updated to remain accurate and are beyond the scope of what i think should hold this PR back from being merged

this should be merged with a normal merge rather than being squashed

Copy link
Member

@babblebey babblebey left a comment

Choose a reason for hiding this comment

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

Looks good @travi 👍🏾

Ready when you're ready... Let's go!

Just curious though... I see the Pattern where we're doing some things to orchestrate the OIDC session with the specific CI i.e. (GitHub Actions and GitLab Pipelines)... Is this the kinda pattern we get to follow if we want to support OIDC in other CI environments?? 🤔

@travi
Copy link
Member Author

travi commented Oct 19, 2025

Is this the kinda pattern we get to follow if we want to support OIDC in other CI environments?? 🤔

unfortunately, yes. with the current state of things. any new ci providers that are added to the supported list on the npm registry side would require additional implementation in this plugin. i think this work sets us up for that work to be pretty minimal, but it would require work.

the same would be true if alternative registries followed the path outlined in the "For other Registries" section of npm/cli#8336. however, this work prepares us less for that scenario, since this currently puts a hard limit on the official registry. we'd need to check the registry for the presence of this endpoint if that pattern were followed. if a different pattern were followed, we'd need an even more custom implementation per registry.

i don't like this plugin to have any knowledge of the ci service that it is running in, but in the case of both "trusted publishing" and provenance, the ci context is an important detail. ideally, the npm cli could give us a way to check if it is supported without needing to know the level of detail about the context that was required for this change, but that is the current reality.

this was my reasoning when opening npm/cli#8525. i think there are valid pieces of that request to follow up on after getting this version released. i wanted to be early in supporting trusted publishing, but that gap delayed getting this implementation together. now, there are tight deadlines that have already partially passed. this implementation works in the context of the current reality enabled by the current cli and registry. i hope we can influence that path to improve in the future after we release this version. it could simplify our current implementation, but also enable us to support future options as they become available.

@travi travi merged commit d321e46 into master Oct 19, 2025
6 checks passed
@travi travi deleted the beta branch October 19, 2025 16:05
@github-actions
Copy link

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

ensure support for OIDC with the official registry

3 participants