Unified release process#36456
Merged
Merged
Conversation
|
Comparing: 926fa85...bf94d93 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
95409bb to
56763b5
Compare
hoxyq
approved these changes
May 26, 2026
Comment on lines
19
to
23
| // Publishing experimental versions as stable is forbidden | ||
| const isExperimental = false; | ||
|
|
||
| params.cwd = join(__dirname, '..', '..'); | ||
| params.packages = await getPublicPackages(isExperimental); |
Contributor
There was a problem hiding this comment.
Can this break the publishing of the react-markup package?
Contributor
There was a problem hiding this comment.
More details:
The new scripts/release/publish.js hardcodes:
// Publishing experimental versions as stable is forbidden
const isExperimental = false;
...
params.packages = await getPublicPackages(isExperimental);
But the workflow still drives the experimental publish path:
- name: Stage experimental artifacts
if: ${{ needs.resolve.outputs.release_type == 'nightly' || needs.resolve.outputs.release_type == 'experimental_only' }}
run: scripts/release/prepare-release-from-ci.js --skipTests -r experimental --commit=${{ github.sha }}
- name: Publish experimental to @experimental
...
run: scripts/release/publish.js --tag=experimental ...
getPublicPackages(false) returns only stablePackages from ReactVersions.js. experimentalPackages = ['react-markup'] is excluded. The new publish.js iterates params.packages (not build/node_modules/),
so react-markup will sit in the staged build directory and never be published.
Old behavior: publish.js derived isExperimental from build/node_modules/react/package.json version string, which for the experimental staging contains experimental-… → isExperimental=true →
react-markup included.
The PR's test runs cover canary publication but I don't see one that verifies the experimental publish actually pushed react-markup. Worth either:
- deriving isExperimental from --tag === 'experimental' (or from the staged react package version, as before), or
- iterating build/node_modules/* directly and verifying each is in the expected package set.
The comment "Publishing experimental versions as stable is forbidden" describes a different concern than what the code actually does.
Collaborator
Author
There was a problem hiding this comment.
Yeah I missed that. Publishing of experimental packages should be fixed with 235f3a9 (this PR)
Co-authored-by: Ruslan Lesiutin <[email protected]>
d71a28d to
235f3a9
Compare
e.g. we already dropped a static token in favor of OIDC tokens
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.
This unifies the release process for Nightlies and stable releases within a single workflow. The publish job now runs in a protected GitHub environment that matches our protected branches. This ensures release are only published from source that is reviewed by at least two people (commit author and reviewer). No self-review is allowed.
Any release going forward will be done from CI.
Discord notifications and automatic Nightlies should work like before.
Authentication is based on NPM's Trusted Publishing which allows us to drop usage of static automation tokens. However, this means
canary(no morenexttag)backporttag insteadThese downsides are unavoidable with NPM's Trusted Publishing. OIDC tokens from GitHub are only allowed to use
npm publish(which only allows a single tag). Nonpm dist-tagornpm deprecateoperations are allowed.Backport releases are blocked until we implement a custom Ruleset bypass to allow ref creation. If we'd allow ref creation for
releases/**/*, a single compromised account with write access could just create the ref from an unreviewed commit.For a stable release, manually bumping versions is still required.
I removed the "release from npm" workflow since that's largely defunct. Especially for backport releases we wouldn't validate a Canary before so all that adds is time between vulnerability discovery and fix being published. Still an interesting idea to implement but since we nowadays publish canaries from CI and use the same artifacts for stable, I don't see much added confidence we'd gain by using NPM artifacts.
Test plan
mainreleases -canary-mainreleases ReactVersions.jsmainreleases ReactVersions with allow-listed packages