chore: add release PR workflow and npm provenance#2434
Merged
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a changesets-driven Release workflow that opens a "Version Packages" PR on `next` and publishes when the PR is merged, with every tarball signed via npm Trusted Publishing (OIDC, no NPM_TOKEN). Also attaches SLSA provenance to the existing nightly and experimental publishes via id-token: write + NPM_CONFIG_PROVENANCE=true, fixes the stale baseBranch in .changeset/config.json (main -> next), and enables @changesets/changelog-github so release PR bodies link back to source PRs.
Tests already pass on the PR via tests.yml before merge to next, so re-running them on the release path just adds latency.
74df912 to
e3e3bf1
Compare
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.
Summary
Introduces a bot-maintained "Version Packages" PR for
nextand migrates the publish path to npm Trusted Publishing so every published tarball carries a verifiable SLSA provenance attestation.What the new workflow does
nextwith unconsumed changesets → opens/updates achore: version packagesPR with the version bumps. Nothing publishes.nextwithout unconsumed changesets (i.e. the version PR was just merged) → runspnpm changeset publish, which publishes only packages whosepackage.jsonversion is newer than what's on npm.Provenance is auto-attached because the job runs with
id-token: writeand the npm CLI ≥ 11.5.1 detects the OIDC environment. After publish, runnpm audit signatureson a consumer machine to verify, or look for the green "Built and signed on GitHub Actions" badge on each npm package page.Manual setup already completed on npmjs.com
Trusted Publisher → GitHub Actions added for all 12 publishable packages (
react-spring,@react-spring/{animated,core,parallax,rafz,shared,types,konva,native,three,web,zdog}) pointing atpmndrs/react-spring→release.yml.Other corrections folded in
.changeset/config.jsonbaseBranchwas stillmaindespite the active line beingnext— fixed.changelogswitched on (@changesets/changelog-github) so release PR bodies link each entry to its source PR.nightly.yml/experimental.ymlnow also attach provenance to their snapshot publishes viaid-token: write+NPM_CONFIG_PROVENANCE=trueinscripts/version-and-publish.sh. They continue to useNPM_TOKENfor now; migrating those flows to Trusted Publishing is a follow-up.