Skip to content

Commit c737af5

Browse files
author
brizental
committed
Add documentation about making a new release
1 parent 4ac2014 commit c737af5

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

docs/release.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Glean.js release process
2+
3+
Glean.js is released in the [`@mozilla/glean`](https://www.npmjs.com/package/@mozilla/glean) npm package.
4+
5+
That package will contain subpackages with Glean.js builds for each environment supported.
6+
7+
The development & release process roughly follows the [GitFlow model](https://nvie.com/posts/a-successful-git-branching-model/).
8+
9+
> **Note**: The rest of this section assumes that `upstream` points to the `https://github.com/mozilla/glean.js` repository, while `origin` points to the developer fork. For some developer workflows, `upstream` can be the same as `origin`.
10+
11+
## Standard release
12+
13+
Releases can only be done by one of the Glean maintainers.
14+
15+
- Main development branch: `main`
16+
- Main release branch: `release`
17+
- Specific release branch: `release-vX.Y.Z`
18+
19+
### Create a release branch
20+
21+
1. Create a release branch from the `main` branch:
22+
```
23+
git checkout -b release-v25.0.0 main
24+
```
25+
2. Update the changelog .
26+
1. Add any missing important changes under the `Unreleased changes` headline.
27+
2. Commit any changes to the changelog file due to the previous step.
28+
3. Run `bin/prepare-release.sh <new version>` to bump the version number.
29+
1. The new version should be the next patch, minor or major version of what is currently released.
30+
2. Let it create a commit for you.
31+
4. Push the new release branch:
32+
```
33+
git push upstream release-v25.0.0
34+
```
35+
5. Wait for CI to finish on that branch and ensure it's green:
36+
* <https://circleci.com/gh/mozilla/glean.js/tree/release-v25.0.0>
37+
6. Apply additional commits for bug fixes to this branch.
38+
* Adding large new features here is strictly prohibited. They need to go to the `main` branch and wait for the next release.
39+
40+
### Finish a release branch
41+
42+
When CI has finished and is green for your specific release branch, you are ready to cut a release.
43+
44+
1. Check out the main release branch:
45+
```
46+
git checkout release
47+
```
48+
2. Merge the specific release branch:
49+
```
50+
git merge --no-ff release-v25.0.0
51+
```
52+
3. Push the main release branch:
53+
```
54+
git push upstream release
55+
```
56+
4. Tag the release on GitHub:
57+
1. [Draft a New Release](https://github.com/mozilla/glean.js/releases/new) in the GitHub UI (`Releases > Draft a New Release`).
58+
2. Enter `v<myversion>` as the tag. It's important this is the same as the version you specified to the `prepare_release.sh` script, with the `v` prefix added.
59+
3. Select the `release` branch as the target.
60+
4. Under the description, paste the contents of the release notes from `CHANGELOG.md`.
61+
5. Wait for the CI build to complete for the tag.
62+
* You can check [on CircleCI for the running build](https://circleci.com/gh/mozilla/glean.js).
63+
6. Send a pull request to merge back the specific release branch to the development branch: <https://github.com/mozilla/glean.js/compare/main...release-v25.0.0?expand=1>
64+
* This is important so that no changes are lost.
65+
* This might have merge conflicts with the `main` branch, which you need to fix before it is merged.
66+
7. Once the above pull request lands, delete the specific release branch.

0 commit comments

Comments
 (0)