scripts/release/README.md
This document describes how to prepare and publish a release manually, using the command line.
However, most of our releases are actually prereleases that get continuously shipped via CI. Our automated prerelease channels are preferred whenever possible, because if they accidentally break, it won't affect production users.
Before proceeding, consider your motivation:
If this is your first time running the release scripts, go to the scripts/release directory and run yarn to install the dependencies.
The release process consists of several phases, each one represented by one of the scripts below.
A typical release cycle goes like this:
canary and experimental channels, from tip of the main branch.
You can also trigger an automated prerelease via the GitHub UI, instead of waiting until the next time the cron job runs.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:
This will grab the specified revision on the main branch and publish it to the Next and Experimental channels.
Same as for a prerelease except choose experimental-only as the type
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.
Stable releases should always be created from the "canary" channel. This encourages better testing of the actual release artifacts and reduces the chance of unintended changes accidentally being included in a stable release.
Before promoting, make sure the versions have been bumped:
package.json files for each packageOnce the "canary" release has been tested and verified, you can promote it to stable by running the Publish release GitHub Action workflow. This workflow will prepare the release artifacts and publish them to NPM as either stable-latest (e.g. for react@latest) or stable-backport for an older release line that shouldn't move @latest (published under the @backport dist-tag instead).
[!IMPORTANT] The designated commit must be able to build in CI. If runtime_build_and_test.yml fails for that commit, the release workflow will also fail.
main which you want to backportreleases/**/* e.g. releases/19.1.xReactVersions.js, ReactVersion.js, package.json) are set to an unreleased versionworkflow_from is the newly pushed commit containing cherry-picked changes,type is either stable-latest (e.g. for react@latest) or stable-backport for an older release line that shouldn't move @latest (published under the @backport dist-tag instead).