Skip to content

[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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

poteto
Copy link
Member

@poteto poteto commented Jun 13, 2025

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.

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.
@poteto poteto changed the title [ci] Update prerelease scripts to allow publishing specific packages [ci] Update prerelease workflows to allow publishing specific packages Jun 13, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jun 13, 2025
@poteto poteto requested a review from yungsters June 13, 2025 17:42
@react-sizebot
Copy link

Comparing: 12bc60f...6be4d33

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.11% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.47 kB 530.47 kB = 93.64 kB 93.64 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.56 kB 651.56 kB = 114.75 kB 114.75 kB
facebook-www/ReactDOM-prod.classic.js = 674.98 kB 674.98 kB = 118.81 kB 118.81 kB
facebook-www/ReactDOM-prod.modern.js = 665.46 kB 665.46 kB = 117.23 kB 117.23 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 6be4d33

Comment on lines +80 to +97
- 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'}}
Copy link
Contributor

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.)

Copy link
Member Author

@poteto poteto Jun 13, 2025

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 💀:

if (params.onlyPackages.length > 0 && params.skipPackages.length > 0) {
console.error(
'--onlyPackages and --skipPackages cannot be used together'
);
process.exit(1);
}

Copy link
Contributor

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.

Copy link
Contributor

@yungsters yungsters left a 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants