Skip to content

feat: Generic & CircleCI Trusted Publishing#1122

Open
dopry wants to merge 1 commit into
semantic-release:masterfrom
dopry:feat/circleci-trusted-publishing
Open

feat: Generic & CircleCI Trusted Publishing#1122
dopry wants to merge 1 commit into
semantic-release:masterfrom
dopry:feat/circleci-trusted-publishing

Conversation

@dopry
Copy link
Copy Markdown

@dopry dopry commented Mar 31, 2026

  • add generic support for trusted publishing via NPM_ID_TOKEN to decouple semantic release from CI platforms.
  • document trusted publishing with CircleCI

fixes #1121

@z4ce
Copy link
Copy Markdown

z4ce commented May 12, 2026

@travi any way you could consider merging this so those of us using semantic release on circle can use trusted publishing?

@travi
Copy link
Copy Markdown
Member

travi commented May 15, 2026

one of my hesitations with this approach is the generic handling. the npm docs still only list three supported providers. suggesting that a generic approach can work beyond that list goes beyond what i think the npm team has defined. i'm ok with adding circle to our supported list, but i think i would still want to handle it specifically rather than generically.

i think the path to more generic support depends on what the npm team ends up doing with npm/cli#8525 because i want to avoid us being in the game of keeping up with each additional ci provider enabled by the npm team

Comment thread README.md
| Variable | Description |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NPM_TOKEN` | Npm token created via [npm token create](https://docs.npmjs.com/getting-started/working_with_tokens#how-to-create-new-tokens) |
| `NPM_ID_TOKEN` | OIDC identity token for [trusted publishing](https://docs.npmjs.com/trusted-publishers). Must be configured in your CI job (see [GitLab](#trusted-publishing-for-gitlab-pipelines), [CircleCI](#trusted-publishing-for-circleci)). Takes priority over CI-specific token retrieval when set. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Must be configured in your CI job

i think we need some adjustment here to clarify that this is only needed for specific ci providers. the current wording doesnt make it clear that this is not required in the context of github actions, for example

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@travi what would you suggest?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What if you just added "This is not required when using trusted publishing in Github Actions." after the parenthetical and before the "takes priority..."?

@z4ce
Copy link
Copy Markdown

z4ce commented May 21, 2026

@dopry would you be able to modify the PR to address @travi 's concerns and scope it to just circle until the generic question is answered upstream?

@dopry
Copy link
Copy Markdown
Author

dopry commented May 21, 2026

one of my hesitations with this approach is the generic handling. the npm docs still only list three supported providers. suggesting that a generic approach can work beyond that list goes beyond what i think the npm team has defined. i'm ok with adding circle to our supported list, but i think i would still want to handle it specifically rather than generically.

i think the path to more generic support depends on what the npm team ends up doing with npm/cli#8525 because i want to avoid us being in the game of keeping up with each additional ci provider enabled by the npm team

I specifically did the 'generic' so the semantic-release team wouldn't need to chase every added CI provider and because that is the way npm works in practice, even if it's not documented that way. Frankly, its saddening that NPM is picking specific vendors to support over creating open standards in this case.

- add generic support for trusted publishing via NPM_ID_TOKEN to
   decouple semantic release from CI platforms.
- document trusted publishing with CircleCI
@dopry dopry force-pushed the feat/circleci-trusted-publishing branch from e192430 to c4d56cf Compare May 21, 2026 19:17
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.

Support OIDC trusted publishing on CircleCI

4 participants