You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide-hermes-release.md
+140-7Lines changed: 140 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,21 @@
5
5
6
6
Prerequisites: You'll need access to the [Hermes repo](https://github.com/facebook/hermes). You can give yourself permission via the Meta Internal OSS dashboard.
7
7
8
-
## Step 1: Check-out or create the Hermes release branch
8
+
See the guide you need, based on the React native release you are running:
9
+
-[React Native >= 0.83](#for-react-native--083)
10
+
-[React Native < 0.82](#for-react-native--082)
9
11
10
-
### If you are cutting a release candidate
12
+
## For React Native >= 0.83
13
+
14
+
Starting from React Native 0.83, we need to have two tags for Hermes:
15
+
- A tag for the (legacy) Hermes
16
+
- A tag for HermesV1
17
+
18
+
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
19
+
20
+
### Step 1: Check-out or create the (Legacy) Hermes release branch
21
+
22
+
#### If you are cutting a release candidate
11
23
Create a Hermes release branch of the form `rn/<major>.<minor>-stable` from latest `main`.
> If you cutting a release candidate, skip this step
41
+
42
+
1. Pick the relevant commits onto that branch. The pick requests should be from `main` and no other branch on Hermes.
43
+
2. Push the picks to the remote branch.
44
+
45
+
#### For HermesV1
46
+
47
+
> [!Important]
48
+
> If you cutting a release candidate, skip this step
49
+
50
+
1. Checkout the `250829098.0.0-stable` branch.
51
+
2. Pick the relevant commits onto that branch. The pick requests should be from `static_h` and no other branch on Hermes.
52
+
3. Push the picks to the remote branch.
53
+
54
+
> [!Important]
55
+
> If you cherry picked something, you need to bump the patch version of hermes, as shown in [this commit](https://github.com/facebook/hermes/commit/ddd708a85b164d1841c024973d0f6d3fad60a4c2)
56
+
> 1. Open the [`npm/hermes-compiler/package.json`](https://github.com/facebook/hermes/blob/ddd708a85b164d1841c024973d0f6d3fad60a4c2/npm/hermes-compiler/package.json) file
57
+
> 2. Bump the patch number by 1
58
+
> 3. Commit and push.
59
+
60
+
### Step 3: Bump hermes-compiler versions
61
+
62
+
> [!Important]
63
+
> This step is required only if
64
+
> - we cherry-picked something in one of the branches
65
+
66
+
Hermes is now publishing the [`hermes-compiler`](https://www.npmjs.com/package/hermes-compiler) package on NPM to release the hermes-compiler as a seprate npm package.
67
+
You have to update the versions for both Legacy Hermes.
68
+
69
+
#### For Legacy Hermes
70
+
71
+
From the release branch (e.g.: `rn/0.83.0-stable`):
72
+
1. Open the [`npm/hermes-compiler/package.json`](https://github.com/facebook/hermes/blob/ddd708a85b164d1841c024973d0f6d3fad60a4c2/npm/hermes-compiler/package.json) file
73
+
2. Bump the **patch** number by 1
74
+
3. Commit and push.
75
+
76
+
### Step 4: Build Hermes and Publish Tag
77
+
78
+
Navigate to the [RN Build Hermes](https://github.com/facebook/hermes/actions/workflows/rn-build-hermes.yml) and run the workflow twice.
79
+
This workflow:
80
+
- builds the Hermes artifacts;
81
+
- publishes them on maven;
82
+
- publishes the hermes-compiler to NPM;
83
+
- publish the tag on GitHub
84
+
85
+
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.
86
+
87
+
#### For (Legacy) Hermes
88
+
89
+
1. Set the branch to the release branch (e.g.: rn/0.83-stable)
90
+
2. Set the release type as `Release`
91
+
92
+
#### For Hermes V1
93
+
94
+
1. Set the branch to the Hermes V1 release branch: `250829098.0.0-stable`
95
+
2. Set the release type as `Release`
96
+
97
+
### Step 5: Bump the Hermes version on the React Native release branch
98
+
99
+
Using the newly generated Hermes tag run the following script on the React Native release branch:
100
+
101
+
```bash
102
+
# Replace <the_hermes_tag> with the tag that will look like 'hermes-2022-07-20-RNv0.70.0-bc97c5399e0789c0a323f8e1431986e207a9e8ba'
### Step 5: [Only for Branch Cut] Bump version on `main` and Hermes v1 release branch
130
+
131
+
The `main` branch and the `250829098.0.0-stable` should always track the next version that we are going to release.
132
+
133
+
After the build started and the tag is generated, bump the hermes-compiler versions on those branches:
134
+
135
+
#### For Legacy Hermes
136
+
137
+
From the `main` branch:
138
+
1. Create a separate branch `<username>/bump-hermes-compiler-to-0.X.0` (replace `<username>` and `X` with your gh username and the next minor version of Hermes)
139
+
1. Open the [`npm/hermes-compiler/package.json`](https://github.com/facebook/hermes/blob/ddd708a85b164d1841c024973d0f6d3fad60a4c2/npm/hermes-compiler/package.json) file
140
+
2. Bump the **minor** number by 1
141
+
3. Commit and push.
142
+
4. Open a PR on the Hermes repository
143
+
5. Import and land it.
144
+
145
+
#### For Hermes V1
146
+
147
+
From the `250829098.0.0-stable` branch
148
+
1. Open the [`npm/hermes-compiler/package.json`](https://github.com/facebook/hermes/blob/ddd708a85b164d1841c024973d0f6d3fad60a4c2/npm/hermes-compiler/package.json) file
149
+
2. Bump the **patch** number by 1
150
+
3. Commit and push.
151
+
152
+
---
153
+
154
+
## For React Native < 0.82
155
+
156
+
### Step 1: Check-out the Hermes release branch
24
157
25
158
Check out the Hermes release branch for your minor. It should be of the form `rn/<major>.<minor>-stable`.
26
159
27
160
> [!Tip]
28
161
> If one doesn't exist and you are not releasing a release candidate, use the [latest tag](https://github.com/facebook/hermes/tags) 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.
29
162
30
-
## Step 2: Cherry-pick
163
+
###Step 2: Cherry-pick
31
164
32
165
> [!Important]
33
166
> If you cutting a release candidate, skip this step
@@ -36,9 +169,9 @@ Pick the relevant commits onto that branch. The pick requests should be from `ma
36
169
37
170
Push the picks to the remote branch.
38
171
39
-
## Step 3: Publish Tag
172
+
###Step 3: Publish Tag
40
173
41
-
Head to the [Publish Tag workflow](https://github.com/facebook/hermes/actions/workflows/create-tag.yml) in the Hermes repo.
174
+
Head to the [Publish Tag workflow](https://github.com/facebook/hermes/actions/workflows/create-tag-legacy.yml) in the Hermes repo.
42
175
43
176
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.
44
177
@@ -58,7 +191,7 @@ Using the newly generated Hermes tag run the following script on the React Nativ
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.
194
+
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.
0 commit comments