-
Notifications
You must be signed in to change notification settings - Fork 67
Configure trusted publishing #1427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Strift
wants to merge
2
commits into
main
Choose a base branch
from
chore/add-OIDC-permissions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27
−21
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
changesets/action OIDC trusted publishing npm support💡 Result:
Short answer: changesets/action does not yet support npm Trusted Publishing / OIDC. The action still expects an NPM_TOKEN (secret) for publishing; there is an open feature request to add Trusted‑Publishing / OIDC support. [1][2][3]
What to do now (concise):
Sources:
OIDC permissions are correctly scoped, but the workflow cannot currently use them.
The permissions block properly enables OIDC token generation with
id-token: writeand restricts repository access withcontents: read. However,changesets/action@v1does not yet support npm Trusted Publishing / OIDC—it still requires NPM_TOKEN secrets. The permissions alone will not enable OIDC in this workflow.The workflow should either:
Currently, the NPM_TOKEN secrets (lines 11, 36, 44) remain the only authentication mechanism for publishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Strift can you check what we can do with changeset please? 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai review the changes to workflow structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Strift, here's my review of the workflow structure changes:
Workflow Structure Analysis
✅ Good Structural Elements
Clear Job Separation: The workflow maintains two distinct jobs with well-defined responsibilities:
version-packages: Handles versioning using changesets (Node 18.x)publish-packages: Handles building and publishing (Node 24.x)Permissions Block: The new top-level
permissionsblock is correctly positioned and scoped:id-token: writeenables OIDC token generationcontents: readprovides minimal repository accessBranch Triggers: Double-quoted branch patterns maintain the same filtering logic (main, pre-release-beta, beta, prototype-beta)
No Job Dependencies: The two jobs appear to run in parallel with no explicit ordering. Consider if
publish-packagesshould depend onversion-packages:Missing OIDC Configuration: While the permissions enable OIDC token generation, the workflow lacks the configuration to actually use it:
.npmrcsetup for provenance--provenanceflag in the publish commandNODE_AUTH_TOKENfrom secrets (line 11)yarn releasecommand needs to be configured to use OIDC instead of the tokenIncomplete OIDC Migration: The workflow appears to be in a hybrid state:
💡 Recommendations
To complete the OIDC/trusted publishing migration:
Configure npm for provenance in the publish job:
Verify
yarn releaseis configured to use npm >= 11.5.1 or properly configured for OIDCConsider removing
NODE_AUTH_TOKENonce OIDC is fully configured (npm will automatically use OIDC tokens when available)Add job dependencies if versioning should complete before publishing
The structural foundation for OIDC is in place, but the workflow needs additional configuration to actually leverage trusted publishing.