You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/release/README.md
+26-5Lines changed: 26 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,27 @@
1
1
# React Release Scripts
2
2
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
+
3
18
The release process consists of several phases, each one represented by one of the scripts below.
4
19
5
-
A typical release goes like this:
20
+
A typical release cycle goes like this:
6
21
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).
9
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.)
10
26
11
27
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
16
32
17
33
<sup>1. [**Creating a patch release**](#creating-a-patch-release) has a slightly different process than a major/minor release.</sup>
18
34
19
-
#Process
35
+
## Trigger an Automated Prerelease
20
36
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
+
```
22
42
43
+
This will grab the most recent revision on the main branch and publish it to the Next and Experimental channels.
23
44
## Publishing Without Tags
24
45
25
46
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