Skip to content

Commit 4e08fb1

Browse files
authored
Update release documentation (#20736)
Added information about automated prereleases
1 parent b12d007 commit 4e08fb1

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

scripts/release/README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
# React Release Scripts
22

3+
This document describes how to prepare and publish a release manually, using the command line.
4+
5+
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.
6+
7+
Before proceeding, consider your motivation:
8+
9+
- **"I want to share experimental features with collaborators."** After your code lands in GitHub (behind an experimental feature flag), it will be automatically published via CI within the next weekday. So usually, all you have to do is wait.
10+
- **"But I want to publish it now!"** You can [trigger the CI job to run automatically](#trigger-an-automated-prerelease).
11+
- **"I want to publish a stable release with a real version number"** Refer to the ["Publishing a Stable Release"]((#publishing-a-stable-release)) section. If this is your first time running a stable release, consult with another team member before proceeding.
12+
- **"I have some special use case that's not explicitly mentioned here."** Read the rest of this document, and consult with another team member before proceeding.
13+
14+
# Process
15+
16+
If this is your first time running the release scripts, go to the `scripts/release` directory and run `yarn` to install the dependencies.
17+
318
The release process consists of several phases, each one represented by one of the scripts below.
419

5-
A typical release goes like this:
20+
A typical release cycle goes like this:
621
1. When a commit is pushed to the React repo, [Circle CI](https://circleci.com/gh/facebook/react/) will build all release bundles and run unit tests against both the source code and the built bundles.
7-
2. The release is then [**published to the `next` channel**](#publishing-release) using the [`prepare-release-from-ci`](#prepare-release-from-ci) and [`publish`](#publish) scripts. (Currently this process is manual but might be automated in the future using [GitHub "actions"](https://github.com/features/actions).)
8-
1. The release may also be [**published to the `experimental` channel**](#publishing-an-experimental-release) using the the same scripts (but different build artifacts).
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.
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 the same scripts (but different build artifacts).
925
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.)
1026

1127
The high level process of creating releases is [documented below](#process). Individual scripts are documented as well:
@@ -16,10 +32,15 @@ The high level process of creating releases is [documented below](#process). Ind
1632

1733
<sup>1. [**Creating a patch release**](#creating-a-patch-release) has a slightly different process than a major/minor release.</sup>
1834

19-
# Process
35+
## Trigger an Automated Prerelease
2036

21-
If this is your first time running the release scripts, go to the `scripts/release` directory and run `yarn` to install the dependencies.
37+
If your code lands in the main branch, it will be automaticaly 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:
38+
39+
```sh
40+
yarn publish-prereleases
41+
```
2242

43+
This will grab the most recent revision on the main branch and publish it to the Next and Experimental channels.
2344
## Publishing Without Tags
2445

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

0 commit comments

Comments
 (0)