|
2 | 2 |
|
3 | 3 | ### Creating a new minor release
|
4 | 4 |
|
5 |
| -1. Create release branch: |
| 5 | +1. Create release branch. The release branch name follows the pattern `release/vX.Y.x`, where `X` is the major version and `Y` is the new minor version. For example, when releasing a new `v1.0.0` version, we'd create the release branch `release/v1.0.x`. |
6 | 6 |
|
7 | 7 | ```bash
|
8 | 8 | git checkout main
|
9 | 9 | git pull origin main
|
10 |
| -git checkout -b release/v0.4.x |
11 |
| -git push origin release/v0.4.x |
| 10 | +git checkout -b release/v1.0.x |
| 11 | +git push origin release/v1.0.x |
12 | 12 | ```
|
13 | 13 |
|
14 |
| -2. Start ephemeral environment and run E2Es on it. |
15 |
| -3. If E2Es are green, tag the release branch: |
| 14 | +2. Update the `change_in` directives for the new release branch. There's an easy one-liner for that [here](#update-change_in-directives). Since the release branch is protected, you'll need a PR for updating it with those changes. |
| 15 | + |
| 16 | +3. Start the ephemeral environment and run the E2Es on it. If the E2Es are not green, you need to fix them before proceeding. |
| 17 | + |
| 18 | +4. If E2Es are green, tag the release branch: |
| 19 | + |
| 20 | +```bash |
| 21 | +git checkout release/v1.0.x |
| 22 | +git pull origin release/v1.0.x |
| 23 | +git tag v1.0.0 |
| 24 | +git push origin v1.0.0 |
| 25 | +``` |
| 26 | + |
| 27 | +1. Use the "Generate Helm chart" and "Release" promotions to create a new Helm chart and push it to a release in GitHub. |
| 28 | + |
| 29 | +2. After the release is published, generate the changelog for it and add it in the release description. Details for that are [here](#generate-changelog). |
| 30 | + |
| 31 | +#### Update change_in directives |
| 32 | + |
| 33 | +You can use [yq](https://mikefarah.gitbook.io/yq) to update all `change_in` directives in the Semaphore YAML: |
16 | 34 |
|
17 | 35 | ```bash
|
18 |
| -git checkout release/v0.4.x |
19 |
| -git pull origin release/v0.4.x |
20 |
| -git tag v0.4.0 |
21 |
| -git push origin v0.4.0 |
| 36 | +yq e -i '(.blocks.[].run.when) |= (. | sub("main", "release/v1.0.x"))' .semaphore/semaphore.yml |
22 | 37 | ```
|
23 | 38 |
|
24 |
| -If the E2Es are not green, you need to fix them before proceeding. |
| 39 | +#### Generate changelog |
25 | 40 |
|
26 |
| -4. Use the "Generate Helm chart" and "Release" promotions to create a new Helm chart and push it to a release in GitHub. |
27 |
| -5. After the release is published, generate the changelog for it and add it in the release description. Use [git-cliff](https://github.com/orhun/git-cliff), using the previous release tag and this one: |
| 41 | +Use [git-cliff](https://github.com/orhun/git-cliff), using the previous release tag and this one: |
28 | 42 |
|
29 | 43 | ```bash
|
30 |
| -git-cliff v0.3.0..v0.4.0 |
| 44 | +git-cliff <previous-version>..v1.0.0 |
31 | 45 | ```
|
32 | 46 |
|
33 | 47 | A few notes here:
|
34 | 48 | - You will need to review the changes and make sure they are appropriate. We are not enforcing conventional commits yet, so some changes might not be included.
|
35 | 49 | - If there are breaking changes, include a section at the beginning of the changelog detailing the breaking changes.
|
36 |
| -- If the upgrade process requires any attention, include a section for it as well. |
| 50 | +- If the upgrade process requires any attention, include a section for it as well. |
0 commit comments