Important
Only Meta release crew should publish Hermes releases. If you are a community releaser that is picking a Hermes pick request, ping a Meta release crew member to publish the Hermes release.
Prerequisites: You'll need access to the Hermes repo. You can give yourself permission via the Meta Internal OSS dashboard.
See the guide you need, based on the React native release you are running:
Starting from React Native 0.83, we need to have two tags for Hermes:
- A tag for the (legacy) Hermes
- A tag for HermesV1
We decoupled the build of Hermes from the React Native repository and we can now consume Hermes binaries that are produced in the Hermes repository
Create a Hermes release branch of the form release-v0.<hermes-minor> from latest main.
Make sure your branch is pushed to the remote.
# Run this in the Hermes repo:
git checkout main
git pull origin main
git checkout -b release-v0.14
git push origin HEAD
Important
If you cutting a release candidate, skip this step
- Pick the relevant commits onto that branch. The pick requests should be from
mainand no other branch on Hermes. - Push the picks to the remote branch.
Important
If you cutting a release candidate, skip this step
- Checkout the
250829098.0.0-stablebranch. - Pick the relevant commits onto that branch. The pick requests should be from
static_hand no other branch on Hermes. - Push the picks to the remote branch.
Navigate to the RN Build Hermes and run the workflow twice. This workflow:
- builds the Hermes artifacts;
- publishes them on maven;
- publishes the hermes-compiler to NPM;
- publish the tag on GitHub
The tag will be created as last step, and we need to wait for the whole process to end before React Native can start the Release.
Important
If you are releasing a patch for legacy Hermes, you also have to bump the patch number hermes-compiler/package.json file from the release-v0.XX branch.
If you are releasing a patch for Hermes V1 for the latest version of React Native, you also have to bump the patch number hermes-compiler/package.json file from the 250829098.0.0-stable
- Set the branch to the release branch (e.g.:
release-v0.14) - Set the release type as
Release
- Set the branch to the Hermes V1 release branch:
250829098.0.0-stable - Set the release type as
Release
Using the newly generated Hermes tag run the following script on the React Native release branch:
# Replace <the_hermes_tag> with the tag that will look like 'hermes-2022-07-20-RNv0.70.0-bc97c5399e0789c0a323f8e1431986e207a9e8ba'
./packages/react-native/scripts/hermes/bump-hermes-version.js -t <the_hermes_tag> -s <the_hermes_v1_tag>An example of the invocation is:
./packages/react-native/scripts/hermes/bump-hermes-version.js -t hermes-v0.14.0 -s hermes-v250829098.0.2
Note
The script also support the -h parameter to specify the legacy Hermes version and the -v parameter to specify the Hermes V1 version.
When not passed, the script will check the latest version of hermes published on NPM and will prompt for confirmation.
Add and commit the extra files that got created at:
- packages/react-native/sdks/.hermesversion
- packages/react-native/sdks/.hermesV1version and updated at:
- packages/react-native/sdks/hermes-engine/version.properties
- packages/react-native/package.json
Now you can continue with the rest of your React Native release.
git add packages/react-native/sdks/.hermesvesion packages/react-native/sdks/.hermesv1vesion packages/react-native/sdks/hermes-engine/version.properties
git commit -m "Bump hermes version"
The main branch and the 250829098.0.0-stable should always track the next version that we are going to release.
After the build started and the tag is generated, bump the hermes-compiler versions on those branches:
From the main branch:
- Create a separate branch
<username>/bump-hermes-compiler-to-0.X.0(replace<username>andXwith your gh username and the next minor version of Hermes) - Open the
npm/hermes-compiler/package.jsonfile - Bump the minor number by 1
- Commit and push.
- Open a PR on the Hermes repository
- Import and land it.
From the 250829098.0.0-stable branch
- Open the
npm/hermes-compiler/package.jsonfile - Bump the patch number by 1
- Commit and push.
- Go to the react-native repository
- Update the
packages/react-native/sdks/hermes-engine/versions.propertiesfile by bumping theHERMES_V1_VERSION_NAMEThis is an example PR.
Check out the Hermes release branch for your minor. It should be of the form rn/<major>.<minor>-stable.
Tip
If one doesn't exist and you are not releasing a release candidate, use the latest tag for your minor. Check out that tag, and create the branch of the form rn/<major>.<minor>-stable. We should be creating these during release candidate cuts.
Important
If you cutting a release candidate, skip this step
Pick the relevant commits onto that branch. The pick requests should be from main and no other branch on Hermes.
Push the picks to the remote branch.
Head to the Publish Tag workflow in the Hermes repo.
Click the "Run Workflow" button. Run the workflow from main, input the React Native version you are releasing (e.g. 0.82.0, 0.82.1, etc), and the SHA of the head of your Hermes release branch.
Once the workflow is complete, it will create a new tag with the release you inputed and SHA. See Hermes tags
Using the newly generated Hermes tag run the following script on the React Native release branch:
# Replace <the_hermes_tag> with the tag that will look like 'hermes-2022-07-20-RNv0.70.0-bc97c5399e0789c0a323f8e1431986e207a9e8ba'
./packages/react-native/scripts/hermes/bump-hermes-version.js -t <the_hermes_tag>Add and commit the extra file that got created at packages/react-native/sdks/hermes/.hermesversion. Now you can continue with the rest of your React Native release.
git add packages/react-native/sdks/.hermesvesion && git commit -m "Bump hermes version"
