Skip to main content

RC Patches

info

Documents in this section go over steps to run different types of React Native release updates. Its intended audience is those in relevant release roles.

Pre-requisites​

  • You have some pick requests that qualify for a new Release Candidate (RC) patch in the "road to 0.XX.0" discussion.
  • Write access to react-native repository.
  • Write access to releases repository.
  • One CircleCI personal API token - see here how to set one.

1. Check out the latest version from release branch​

# Be on relevant release branch
# update the stable branch with tags
git pull origin <release-branch> --tags
git checkout -b <release-branch>

# cherry pick relevant commits
git cherry-pick <commit-hash>

2. Bump monorepo packages​

Update all packages in the monorepo that were modified by the cherry picks. You can do it by running:

yarn bump-all-updated-packages # All the package bumps should be on the patch level
git push origin 0.XX-stable

After pushing, the CI will take care to publish the new packages automatically.

3. Test the current changes​

Before continuing further, follow the testing guide to ensure the source code doesn't have any major issues.

info

Since testing is a time consuming activity (>1 hrs) it is recommended that the release crew coordinates on the steps above then do testing on at least two separate systems in an async way.

4. Run bump-oss-version script​

# once verified all the cherry-picked commits, we can push them to remote
git push

# run a script to bump the version
# You **do not** want this release marked as "latest"!
./scripts/bump-oss-version.js --to-version 0.y.0-rc.x --token <YOUR_CIRCLE_CI_TOKEN>

5. Watch CircleCI to ensure right jobs are being triggered​

  • Once you have run the bump script script, head to CircleCI and you should see under the releases workflow, a prepare-package-for-release job.

    CircleCI showing publish release
    CircleCI showing publish release.
  • Once complete you should be able to run npm view react-native and verify that under the next tag, the version is the expected release version.

    npm view react-native
    ...
    dist-tags:
    latest: 0.(y-1).1 next: 0.y.0-rc.x nightly: 0.0.0-f617e022c

6. Create a GitHub Release​

  • Create a GitHub Release with this template and check "Pre-Release" checkbox.
- <!-- TODO List out notable picks for this patch -->

---

To test it, run:

<!-- TODO Update with your version -->

npx react-native init RN069RC0 --version 0.69.0-rc.0

---

- You can participate in the conversation on the status of this release in the [working group](https://github.com/reactwg/react-native-releases/discussions).

- To help you upgrade to this version, you can use the [upgrade helper](https://react-native-community.github.io/upgrade-helper/) βš›οΈ

- See changes from this release in the [changelog PR](https://github.com/facebook/react-native/labels/%F0%9F%93%9D%20Changelog)

---

### Help us testing πŸ§ͺ

<!-- TODO Add the call to action for something specific that we want folks to test -->

Let us know how it went by posting a comment in the [working group discussion](https://github.com/reactwg/react-native-releases/discussions)! Please specify with system you tried it on (ex. macos, windows).

**Bonus points:** It would be even better if you could swap things around: instead of using a fresh new app, use a more complex one - or use a different library that is already leveraging the new architecture!
Creating a GitHub Release
Creating a GitHub Release.

7. Update the relevant discussion post with the latest RC​

Go back to the "road to 0.XX.0" discussion and update the "Current release candidate" line with the new version you published.

8. Broadcast that release candidate is out​

Once all the steps above have been completed, it's time to signal to the community that the new RC is available for testing! Do so in the following channels:

  • RN Discord #releases-coordination