@samitouri / QOS-React / commits / d98f1a4bc6

[ci] Deprecate yarn publish-prereleases

Added instructions on the new workflow. Let's keep this short around for now as it may be used again due to muscle memory and emit a helpful message instead. ghstack-source-id: 3f840a3d4319309d31cefeae028f97d280b0c09a Pull Request resolved: https://github.com/facebook/react/pull/30510

Lauren Tan committed Jul 29, 2024 at 18:51 UTC d98f1a4bc6fe9cc52e8e9592b385aaa6243bc856
2 files changed +9 -7
package.json
+1 -1
@@ -131,7 +131,7 @@
131 "prettier-all": "node ./scripts/prettier/index.js write",
132 "prettier-check": "node ./scripts/prettier/index.js",
133 "version-check": "node ./scripts/tasks/version-check.js",
134 - "publish-prereleases": "node ./scripts/release/publish-using-ci-workflow.js",
134 + "publish-prereleases": "echo 'This command has been deprecated. Please refer to https://github.com/facebook/react/tree/main/scripts/release#trigger-an-automated-prerelease'",
135 "download-build": "node ./scripts/release/download-experimental-build.js",
136 "download-build-for-head": "node ./scripts/release/download-experimental-build.js --commit=$(git rev-parse HEAD)",
137 "download-build-in-codesandbox-ci": "yarn build --type=node react/index react-dom/index react-dom/src/server react-dom/test-utils scheduler/index react/jsx-runtime react/jsx-dev-runtime",
scripts/release/README.md
+8 -6
@@ -20,7 +20,7 @@ The release process consists of several phases, each one represented by one of t
20 A typical release cycle goes like this:
21 1. When a commit is pushed to the React repo, [GitHub Actions](https://github.com/facebook/react/actions) will build all release bundles and run unit tests against both the source code and the built bundles.
22 2. Each weekday, an automated CI cron job publishes prereleases to the `next` and `experimental` channels, from tip of the main branch.
23 - 1. You can also [trigger an automated prerelease via the command line](#trigger-an-automated-prerelease), instead of waiting until the next time the cron job runs.
23 + 1. You can also [trigger an automated prerelease via the GitHub UI](#trigger-an-automated-prerelease), instead of waiting until the next time the cron job runs.
24 2. For advanced cases, you can [**manually prepare and publish to the `next` channel**](#publishing-release) using the [`prepare-release-from-ci`](#prepare-release-from-ci) and [`publish`](#publish) scripts; or to the [**`experimental` channel**](#publishing-an-experimental-release) using the same scripts (but different build artifacts).
25 3. Finally, a "next" release can be [**promoted to stable**](#publishing-a-stable-release)<sup>1</sup> using the [`prepare-release-from-npm`](#prepare-release-from-npm) and [`publish`](#publish) scripts. (This process is always manual.)
26
@@ -34,13 +34,15 @@ The high level process of creating releases is [documented below](#process). Ind
34
35 ## Trigger an Automated Prerelease
36
37 -If your code lands in the main branch, it will be automatically published to the prerelease channels within the next weekday. However, if you want to immediately publish a prerelease, you can trigger the job to run immediately:
37 +If your code lands in the main branch, it will be automatically published to the prerelease channels within the next weekday. However, if you want to immediately publish a prerelease, you can trigger the job to run immediately via the GitHub UI:
38
39 -```sh
40 -yarn publish-prereleases
41 -```
39 +1. Wait for the commit you want to release to finish its [(Runtime) Build and Test workflow](https://github.com/facebook/react/actions/workflows/runtime_build_and_test.yml), as the prerelease script needs to download the build from that workflow.
40 +2. Copy the git sha of whichever commit you are trying to release
41 +3. Go to https://github.com/facebook/react/actions/workflows/runtime_prereleases_manual.yml
42 +4. Paste the git sha into the "Run workflow" dropdown
43 +5. Let the job finish and it will be released on npm
44
43 -This will grab the most recent revision on the main branch and publish it to the Next and Experimental channels.
45 +This will grab the specified revision on the main branch and publish it to the Next and Experimental channels.
46 ## Publishing Without Tags
47
48 The sections below include meaningful `--tags` in the instructions. However, keep in mind that **the `--tags` arguments is optional**, and you can omit it if you don't want to tag the release on npm at all. This can be useful when preparing breaking changes.