|
| 1 | +--- |
| 2 | +id: release-candidate-minor |
| 3 | +title: Release Minor Candidate |
| 4 | +--- |
| 5 | + |
| 6 | +This document goes over steps to run different types of React Native release updates. It is intended audience is for those in relevant release roles. |
| 7 | + |
| 8 | +### Pre-requisites |
| 9 | + |
| 10 | +- Write access to [react-native](https://github.com/facebook/react-native) repository. |
| 11 | +- Your CircleCI personal API token. See [here](https://circleci.com/docs/2.0/managing-api-tokens/#creating-a-personal-api-token) on how to set one. |
| 12 | +- If testing, follow [pre-requisites for testing](/contributing/release-testing#pre-requisites). |
| 13 | + |
| 14 | +### Creating 0.{minor}.0-rc.0 |
| 15 | + |
| 16 | +- Create the release branch in `react-native` repo with the appropriate name (usually `0.X-stable`). |
| 17 | + |
| 18 | + ```bash |
| 19 | + git checkout main |
| 20 | + git pull origin main |
| 21 | + git checkout -b 0.68-stable |
| 22 | + git push origin 0.68-stable |
| 23 | + |
| 24 | + # This will walk you through what version you are releasing |
| 25 | + ./scripts/bump-oss-version.js -v 0.68.0-rc.0 -t <YOUR_CIRCLE_CI_TOKEN> |
| 26 | + ``` |
| 27 | + |
| 28 | +- Once you have run that script, head to CircleCI and you should see under the releases workflow, a `prepare-package-for-release` job. |
| 29 | + |
| 30 | + <figure> |
| 31 | + <img width="400" alt="CircleCI showing publish release" src="https://user-images.githubusercontent.com/1309636/150040711-cfbc2fe3-91eb-42b9-bd06-de2aa7fb94ea.png"/> |
| 32 | + <figcaption>CircleCI showing publish release.</figcaption> |
| 33 | + </figure> |
| 34 | + |
| 35 | +- This script runs and commits any changes and triggers a deploy job, `build_and_publish_npm_package`. |
| 36 | +- Note: Look under “All Branches” to find the publish job. CircleCI does not give a way to search for these jobs. |
| 37 | +- Once complete you should be able to run `npm view react-native` and verify `next` is expected release version. |
| 38 | + |
| 39 | + ```bash |
| 40 | + npm view react-native |
| 41 | + ... |
| 42 | + dist-tags: |
| 43 | + latest: 0.65.1 next: 0.66.0-rc.2 nightly: 0.0.0-f617e022c |
| 44 | + ``` |
| 45 | + |
| 46 | +### 2. Create a PR of the changelog generator |
| 47 | + |
| 48 | +```bash |
| 49 | +# Run following with the stable release as base, and your rc.0 version |
| 50 | +npx @rnx-kit/rn-changelog-generator --base v[LATEST_STABLE]--compare v[YOUR_RC_0] \ |
| 51 | +--repo ~/react-native --changelog ~/react-native/CHANGELOG.md > NEW_CHANGES.md |
| 52 | + |
| 53 | +# example against 0.66.4 and 0.67.0-rc.0 |
| 54 | +npx @rnx-kit/rn-changelog-generator --base v0.66.4 --compare v0.67.0-rc.0 \ |
| 55 | +--repo ~/react-native --changelog ~/react-native/CHANGELOG.md > NEW_CHANGES.md |
| 56 | +``` |
| 57 | + |
| 58 | +- Prepend contents of `NEW_CHANGES.md` to `CHANGELOG.md`. |
| 59 | +- Create a pull request of this change to `react-native` repo and add the `Changelog` label. |
| 60 | + |
| 61 | +### 3. Create a GitHub Release |
| 62 | + |
| 63 | +- Create a [GitHub Release](https://github.com/facebook/react-native/releases) with this template and **check “Pre-Release” checkbox**. |
| 64 | + |
| 65 | +```markdown |
| 66 | +<!-- Template for pre-release GitHub release --> |
| 67 | + |
| 68 | +- <!-- TODO List out notable picks for this patch --> |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +To test it, run: |
| 73 | + |
| 74 | +<!-- TODO Update with your version --> |
| 75 | + |
| 76 | +npx react-native init RN067RC5 --version 0.67.0-rc.5 |
| 77 | + |
| 78 | +--- |
| 79 | + |
| 80 | +You can participate in the conversation on the status of this release in the [working group](https://github.com/reactwg/react-native-releases/discussions). |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +To help you upgrade to this version, you can use the [upgrade helper](https://react-native-community.github.io/upgrade-helper/) ⚛️ |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +See changes from this release in the [changelog PR](https://github.com/facebook/react-native/labels/%F0%9F%93%9D%20Changelog) |
| 89 | +``` |
| 90 | + |
| 91 | +<figure> |
| 92 | + <img width="400" alt="Creating a GitHub Release" src="https://user-images.githubusercontent.com/1309636/133348648-c33f82b8-b8d2-474a-a06e-35a1fb8d18de.png"/> |
| 93 | + <figcaption>Creating a GitHub Release.</figcaption> |
| 94 | +</figure> |
| 95 | + |
| 96 | +### 4. Create a tracking discussion post |
| 97 | + |
| 98 | +Create a "Road to <YOUR_MINOR_VERSION>" discussion post in [`react-native-releases`](https://github.com/reactwg/react-native-releases/discussions): |
| 99 | + |
| 100 | +```markdown |
| 101 | +<!-- Template for a new minor release candidate --> |
| 102 | +<!-- Title: Road to <YOUR_VERSION> --> |
| 103 | + |
| 104 | +The branch cut has happened. |
| 105 | + |
| 106 | +## Notice |
| 107 | + |
| 108 | +<!-- TODO update the version --> |
| 109 | + |
| 110 | +- [Current release candidate: 0.68.0-rc.0][current-release] |
| 111 | +- Have an issue with current release candidate? [File an issue][issue-form] and we will triage. |
| 112 | +- Have a pick request for this release? Does it fall under our [pick request qualifications][release-faq]? If so please create a PR against the release branch and comment with the PR link |
| 113 | +- If you are release testing. Copy and fill [Test Checklist](/contributing/release-testing#test-checklist). |
| 114 | + |
| 115 | +#### Highlighted Changes in this release |
| 116 | + |
| 117 | +<!-- Add stand-out changes in this release, and link to changelog PR. --> |
| 118 | + |
| 119 | +- Checkout this [Changelog PR][changelog-pr] |
| 120 | + |
| 121 | +## [Release Process][release-processes] |
| 122 | + |
| 123 | +#### Checklist |
| 124 | + |
| 125 | +- [ ] [Changelog PR][changelog-pr] |
| 126 | +- [ ] Start a Google doc of blog post for release and invite contributors of release highlights to expand |
| 127 | +- [ ] Follow up on [release dependencies][release-dependencies] |
| 128 | + > When ready to publish stable |
| 129 | +- [ ] Ship changelog |
| 130 | +- [ ] Ship blog post |
| 131 | +- [ ] Notify `react-native-website` to ship new version |
| 132 | + |
| 133 | +#### Retrospective Topics |
| 134 | + |
| 135 | +<!-- List out pain points, issues to investigate that are not release-blocking to follow up on --> |
| 136 | + |
| 137 | +- |
| 138 | + |
| 139 | +## Release Status |
| 140 | + |
| 141 | +### Tracking 0.67.0-rc.1 |
| 142 | + |
| 143 | +#### Blocking issues for releasing 0.67.0-rc.1 |
| 144 | + |
| 145 | +- |
| 146 | + |
| 147 | +#### Picks for 0.67.0-rc.1 |
| 148 | + |
| 149 | +- |
| 150 | + |
| 151 | +[changelog-pr]: https://github.com/facebook/react-native/labels/%F0%9F%93%9D%20Changelog |
| 152 | +[current-release]: https://github.com/facebook/react-native/releases |
| 153 | +[changelog-wiki]: https://github.com/facebook/react-native/wiki/Release-Changelog |
| 154 | +[release-dependencies]: https://reactnative.dev/contributing/release-dependencies |
| 155 | +[release-faq]: https://reactnative.dev/contributing/release-faq |
| 156 | +[issue-form]: https://github.com/facebook/react-native/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Cpre-release&template=release_blocker_form.yml |
| 157 | +[releases]: https://github.com/facebook/react-native/releases |
| 158 | +[release-processes]: https://reactnative.dev/contributing/how-to |
| 159 | +[upgrade-helper]: https://reactnative.dev/contributing/updating-upgrade-helper |
| 160 | +``` |
| 161 | + |
| 162 | +### 5. Verify that Upgrade Helper GitHub action has fired |
| 163 | + |
| 164 | +- You should see a [new publish job complete here](https://github.com/react-native-community/rn-diff-purge/actions). |
| 165 | +- If not, check out the guide on [how to update Upgrade Helper](/contributing/updating-upgrade-helper). |
| 166 | + |
| 167 | +### 6. Broadcast that release candidate is out |
| 168 | + |
| 169 | +- React Native Twitter. |
| 170 | +- Discord `#releases-coordination` channel. |
0 commit comments