-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How to promote a release
Find a commit corresponding to a published nightly build. These commits have a message starting with "applying package updates", such as this one:
⚠ Once react-native-windows catches up to Facebok master, this build chosen must use the matching version of react-native Facebook selected as the base of their stable branch.
Check out this build locally. E.g. git checkout c9f39b4
Run yarn promote-release --release preview --rnVersion 0.xx
This script will locally create a stable branch and update various configuration files and manifests in the repo to work correctly with the stable branch. After running the tool, a new 0.xx-stable
branch should be locally checked out with changes committed.
At this point the branch is still depending on a nightly build of react-native. Dependencies should be upgraded to the Facebook RC build closest to nightly build (e.g. 0.63.0-rc.0). This update may or may not introduce new changes. A quick way to check is to compare branches on the facebook/react-native Github repo and look for any commits before the first RC version. E.g. for 0.63, there were 5 commits cherry-picked into 0.63-stable before the first RC.
After updating, do a yarn install
to regenerate the lockfile and commit the resulting change.
Manual validation should be performed before publishing the build to ensure there aren't any showstopper issues. The validation performed is outside the scope of this document.
Once ready, push your local branch directly to the microsoft/react-native
repo. E.g. git push origin 0.63-stable
. This will immediately kick off a job to publish the new build.
⚠ Your build will not go through CI validation before publishing. Be sure to perform any needed validation locally (e.g. if going from nightly to RC added any changes)
To prevent older branches from being published as latest
we need to change the tag they publish as. To do that:
- Check out the current branch for
latest
(the one before preview) - run
yarn promote-release --release legacy --rnVersion 0.xx
- Create a PR with the generated commits to the
latest
branch
Ensure there are no pending changes to be published (changefiles in the changes directory).
⚠ Any changefiles targeting preview that slip through after promotion will have the wrong change type and prevent publishing changes
Same as above, we want to do a final check to see if there are any issues that may have slipped in.
- Run
yarn promote-release --release latest --rnVersion 0.xx
- Create a PR with the results