Skip to content

Latest commit

 

History

History
160 lines (112 loc) · 7.41 KB

guide-release-candidate.md

File metadata and controls

160 lines (112 loc) · 7.41 KB

Releasing Release Candidate

Note

Release Candidates will primarily handled by Meta release crew. Community releasers can aid in testing and triaging issues.

The general stages for handling a release candidate:

  1. Cut a release candidate
  2. Release patches on release candidate
  3. Promote release candidate to stable

Pre-requisites

  • Write access to react-native repository.
  • Write access to hermes repository.
  • Write access to releases repository.
  • One CircleCI personal API token - see here how to set one.

Cut a Release Candidate

0. Update External Dependencies

Add a new column for this release candidate in the External Dependencies Supported table. Follow up internally if unsure.

1. Create a new release branch

  • Check-out a clone of react-native repo
  • Pull main
  • Create a release branch. It must be of the form <major>.<minor>-stable
git checkout main
git pull origin main
git checkout -b 0.76-stable

Create a similar branch in the @react-native-community/template project

  • Check-out a clone of @react-native-community/template repo
  • Pull main
  • Create a release branch. It must be of the form <major>.<minor>-stable
  • Push the branch up to origin.
git checkout main
git pull origin main
git checkout -b 0.76-stable
git push --set-upstream origin 0.76-stable

2. Create a Hermes Release

3. Trigger a nightly

Some partners are integrating with the nightlies jobs, so it's a good idea to trigger a nightly right before cutting the branch so that they can integrate with it before we push some release specific fixes in the Release branch.

To trigger a nightly:

  1. Navigate to https://github.com/facebook/react-native/actions/workflows/nightly.yml
  2. Select the Nighly action.
  3. Click on Run workflow.
  4. Keep the branch on main.
  5. Click on Run workflow.

3. Follow the steps in the general release process

At this point, you'll follow the general release process from steps 4-13

Note

The changelog for the release candidate may be quite long and will need some manual curation. In addition, the changelog parser can be flaky and mis-parse some commits. Here are guidelines for editing the changelog

Changelog Guidelines for Release Candidate

  • Remove any commits that are marked "Internal" or are clearly not relevant to React Native OSS developers
    • Examples: commit on BUCK files or code refactoring that do not change behaviours or interfaces
  • Delete dependency bump commits that are superceded by later version bumps.
    • Ex. Delete the commit for bumping X dependency to 0.7.0 if there is a commit to later bump X to 0.8.0
  • At the end of the generated Changelog, there could be two additional sections: the Failed to Parse section and the Unknown section.
    • The Unknown section is populated with commit that landed without the ## Changelog: entry in the summary.
    • The Failed to Parse section contains commits that has a ## Changelog: entry in their summary but, due to typos or other problems, the tool was not able to parse and automatically attribute them to the right section.
    • For both these categories, we have to manually go through the listed commits and move them to the right section, based on the actual change they introduce.

14. Bump minor version of all monorepo packages on main

Now we've cut a release branch, we need to update main monorepo packages and internal Meta dependencies to point to the "next" version.

In fbsource run

js1 publish react-native 0.<your-release-candidate-minor+1>.0-main

# ex. if you just released 0.75.0-rc.0, then
js1 publish react-native 0.76.0-main

This will update all the relevant packages to 0.76.0-main

Release patches on release candidate

You can follow the general release process for patches. The only thing to note is that your versioning scheme should be increasing the prerelease version.

ex. 0.74.0-rc.1 -> 0.74.0-rc.2

See guide to release process

Promote release candidate to stable

Promoting a release candidate to stable is similar to releasing a patch. The difference is now we are releasing the new latest version.

As well, there is follow-up in terms of writing a blog post and communicating to the ecosystem about this release.

1. Release a stable version following release process

2. Update the Support policy

Update the support policy for the new version.

  • The first line should contain the Next Release and the status must be Not Started
  • The other lines must be updated by bumping the versions in the first column by 1 minor

So, for example, if the table contains:

| Version    | Type                  | Status           |
| ---------- | --------------------- | ---------------- |
-| 0.72.x     | Next version          | Not started      |
-| 0.71.x     | Latest stable         | In support       |
-| 0.70.x     | Previous minor series | In support       |
-| 0.69.x     | Previous minor series | In support       |
-| <=0.68.x   | Old minor series      | Unsupported      |
+| 0.73.x     | Next version          | Not started      |
+| 0.72.x     | Latest stable         | In support       |
+| 0.71.x     | Previous minor series | In support       |
+| 0.70.x     | Previous minor series | In support       |
+| <=0.69.x   | Old minor series      | Unsupported      |

3. Ship blog post

4. Update reactnative.dev and cut new version

5. Coordinate a release retrospective date & next release crew