Point people: @grabbou, @kelset
ℹ️ Note that some of these steps rely on Xcode and thus the usage of a Mac.
-
All of these steps assume your working directory is an up-to-date checkout of the stable branch of the react-native repo:
cd /path/to/clone/of/react-native git checkout 0.42-stable git pull -
Now, assuming you have built react-native previously, cleanup your environment:
- Remove the
RNTesterandRNTestProjectapps from both the iOS simulator and Android emulator. - Then remove any build-artifacts:
rm react-native-*.tgz ./gradlew clean ./gradlew cleanBuildCache rm -rf node_modules rm -rf /tmp/RNTestProject pushd packages/rn-tester rm -rf Pods xcodebuild -workspace RNTesterPods.xcworkspace -scheme RNTester clean popd
- Remove the
-
Ensure you have everything installed that’s required to cut a release:
- You have push access to the stable branch on the react-native repo.
- The Android toolchain, as per the “Android development environment” section of the react-native setup guide.
- Download the needed version of NDK. You can find out which version to use by looking in the CI Android image dockerfile. Currently, it's NDK 21, which can be downloaded via Android Studio by following this guide. After downloading/installing it, it will be placed at a path similar to
~/Library/Android/sdk/ndk/21.4.7075529, then add the following environment setup:export ANDROID_NDK=$HOME/Library/Android/sdk/ndk/21.4.7075529
- In case you are on macos Catalina (or higher), you might also need to run
sudo xattr -r -d com.apple.quarantine /path/to/ndkto avoid the e2e script to fail. That said, this should not happen anymore since from NDK 21 and higher the Android team started signing the NDK.
- In case you are on macos Catalina (or higher), you might also need to run
- Latest iOS
- Latest yarn
- Latest CocoaPods
- Install dependencies:
yarn install pushd packages/rn-tester pod install --repo-update popd
-
Launch the Android emulator, which you can do from the ‘AVD Manager’ of Android Studio.
-
Run the script that will guide you through manually testing whether
RNTesterand new applications work on both iOS and Android:./scripts/test-manual-e2e.sh
-
In case your local branch has changes that do not yet exist on the remote, push them now and make not of possible deterioration of CI status.
-
Bump the version numbers, which should also push the change to the remote:
./scripts/bump-oss-version.js [VERSION]
-
Pushing the changed version numbers will eventually kickoff the
publish_npm_packageworkflow on CI, keep an eye on it. -
Test that npmjs.com returns the correct results:
npm view react-native
-
Once more test that creating a new application works as expected:
npx react-native init TestRelease --version [VERSION]
-
Communicate the release as per the instructions in the release-process doc. Read more ⇒