-
Notifications
You must be signed in to change notification settings - Fork 49.1k
[ci] Update prerelease workflows to allow publishing specific packages #33525
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
Conversation
It may be useful at times to publish only specific packages as an experimental tag. For example, if we need to cherry pick some fixes for an old release, we can first do so by creating that as an experimental release just for that package to allow for quick testing by downstream projects. Similar to .github/workflows/runtime_releases_from_npm_manual.yml I added three options (`dry`, `only_packages`, `skip_packages`) to `runtime_prereleases.yml` which both the manual and nightly workflows reuse. I also added a discord notification when the manual workflow is run.
Comparing: 12bc60f...6be4d33 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) |
- if: '${{ inputs.only_packages }}' | ||
name: 'Publish ${{ inputs.only_packages }}' | ||
run: | | ||
scripts/release/publish.js \ | ||
--ci \ | ||
--skipTests \ | ||
--tags=${{ inputs.dist_tag }} \ | ||
--onlyPackages=${{ inputs.only_packages }} ${{ (inputs.dry && '') || '\'}} | ||
${{ inputs.dry && '--dry'}} | ||
- if: '${{ inputs.skip_packages }}' | ||
name: 'Publish all packages EXCEPT ${{ inputs.skip_packages }}' | ||
run: | | ||
scripts/release/publish.js \ | ||
--ci \ | ||
--skipTests \ | ||
--tags=${{ inputs.dist_tag }} \ | ||
--skipPackages=${{ inputs.skip_packages }} ${{ (inputs.dry && '') || '\'}} | ||
${{ inputs.dry && '--dry'}} |
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.
Should we error if both are supplied? (The way this is implemented, they are conflicting.)
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.
I check it here because yml is such a pain 💀:
react/scripts/release/publish.js
Lines 34 to 39 in 12bc60f
if (params.onlyPackages.length > 0 && params.skipPackages.length > 0) { | |
console.error( | |
'--onlyPackages and --skipPackages cannot be used together' | |
); | |
process.exit(1); | |
} |
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.
Ahh, okay! Thanks for clarifying.
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.
Thanks! Just one minor suggestion (that probably won't block anyone, in practice).
## Summary Follow-up to #33525 Fixes `Unsupported tag: "false"` (https://github.com/facebook/react/actions/runs/15773778995/job/44463562733#step:13:12) which also affects nightly releases. ## How did you test this change? - [x] Run successful, manual prerelease from this branch: https://github.com/facebook/react/actions/runs/15774083406
It may be useful at times to publish only specific packages as an experimental tag. For example, if we need to cherry pick some fixes for an old release, we can first do so by creating that as an experimental release just for that package to allow for quick testing by downstream projects.
Similar to .github/workflows/runtime_releases_from_npm_manual.yml I added three options (
dry
,only_packages
,skip_packages
) toruntime_prereleases.yml
which both the manual and nightly workflows reuse. I also added a discord notification when the manual workflow is run.