Repository navigation
[remote-ui] Publish to npm via OIDC trusted publishing - #745
Closed
robin-drexler wants to merge 1 commit into
Closed
robin-drexler wants to merge 1 commit into
robin-drexler wants to merge 1 commit into
Conversation
Gives the Changesets job id-token: write and an empty NPM_TOKEN so changesets/action skips writing an .npmrc and npm does the OIDC token exchange instead. Provenance is enabled to match main. Pins changesets/action to the v1.9.0 SHA main uses (v1 points to the same commit today) since the job can now mint OIDC tokens, and locks GITHUB_TOKEN down to contents: read. Pushes and the release PR already go through SHOPIFY_GH_ACCESS_TOKEN. Adds a repository field to every @remote-ui/* package. npm rejects provenance publishes when repository.url doesn't match the source repo.
Contributor
|
We detected some changes in |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #744. The
remote-uibranch still publishes withNPM_TOKEN, and it needs to move to OIDC trusted publishing (likemainalready did) before we merge #741.changesets.ymlgetsid-token: writeandNPM_TOKEN: ''. With an empty token, changesets/action skips writing an.npmrcand npm does the OIDC exchange on its own. Provenance is on, same asmain.changesets/actionto the v1.9.0 SHAmainuses.v1points to the exact same commit today, so no behavior change, but I'd rather not handid-token: writeto a moving tag.GITHUB_TOKENdown tocontents: read. Pushes and the release PR already go throughSHOPIFY_GH_ACCESS_TOKEN.repositoryto every@remote-ui/*package.json. None of them had one, and npm rejects provenance publishes whenrepository.urldoesn't match the repo the workflow ran in.Heads up: every package that gets published also needs a trusted publisher on npm pointing at
changesets.yml. AFAIK only@remote-ui/coreand@remote-ui/reacthave been requested so far, but #741 also publishesdom,htm,testing,traversalandvue. If those aren't set up before #741 merges, we'll end up with a partial release.🎩
changesets.ymlonly runs on push toremote-ui, so this can't really be exercised in the PR. Merging this just refreshes Version Packages #741. The first real OIDC publish happens when Version Packages #741 merges.