Skip to content

Commit 08e7bd6

Browse files
authored
Merge pull request #2761 from headlamp-k8s/release-guide
docs: release-guide.md: Add release-guide.md doc
2 parents b3e95c2 + 7bf1dd7 commit 08e7bd6

File tree

2 files changed

+113
-0
lines changed

2 files changed

+113
-0
lines changed

docs/development/release-guide.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Release Guide
3+
sidebar_position: 6
4+
---
5+
6+
This document describes how to perform a Headlamp release.
7+
8+
The idea is that we list the steps here as a guide and automate it along the way, so the number of steps is reduced as much as possible in the future.
9+
10+
## Version bumping
11+
12+
We follow the [semantic versioning](https://semver.org/) guide.
13+
14+
## Steps to perform a Headlamp release
15+
16+
When ready to perform a release (changes worth releasing since last time is done, QA is done), then:
17+
18+
### 1. Create a new branch
19+
20+
Create a new branch called "rc-X.Y.Z" where X.Y.Z is the new release version.
21+
22+
### 2. Bump the app “version”
23+
24+
On the main branch, bump the “version” field in app/package.json, run "npm i" inside app/ and commit with:
25+
26+
```shell
27+
git commit app/package* -m "app: Bump version to X.Y.Z"
28+
```
29+
30+
Bug fix: make a branch off the tag, and cherry pick everything in. Or make a branch off main and remove merge commits compared to previous tag (On the branch to remove merge commits, do: "`git rebase main`").
31+
32+
```shell
33+
git log v0.25.0.. --oneline
34+
```
35+
36+
37+
38+
### 3. Start a release draft
39+
40+
Start a release draft by manually running the "Create release draft" action (it's important to give it the right release name as it creates links with that number in the draft):
41+
42+
![Release Version](release-version.png)
43+
44+
### 4. Check the list of changes since the last release
45+
46+
Check the list of changes since the last release:
47+
48+
```
49+
git log \`git describe \--abbrev=0\`..
50+
```
51+
52+
Then go to the release draft created in the previous step and fill it accordingly.
53+
54+
Look at previous releases. Write for humans: no context part, like "frontend:". Put github user name in "(thanks @XXX )" at end of line for external contributors.
55+
56+
57+
### 5. App signing
58+
59+
The build scripts handle app signing.
60+
61+
### 6. Generate Apps
62+
63+
Generate the apps for each the Linux, Windows, and Mac platforms by running the "Build and upload PLATFORM artifact" actions against the "rc-X.Y.Z".
64+
65+
### 7. Download and test Artifacts
66+
67+
Download the artifacts, test them and, if everything goes well, upload them to the new release's assets area.
68+
69+
### 8. Push Assets
70+
71+
Upload the binary to the release's assets with the script.
72+
73+
Run the push-assets.js script for pushing assets. This script pushes the assets and automatically sets the right type for them. It also updates and uploads a checksums file:
74+
75+
```shell
76+
GITHUB_TOKEN=MY_TOKEN_123 node ./app/scripts/push-release-assets.js v0.19.0 Headlamp....tar.gz
77+
```
78+
79+
Note: If you use the gh command line tool, you can use `gh auth token`. To create a new GITHUB_TOKEN, see the document [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
80+
81+
82+
### 9. Push the new tag
83+
84+
Go to the main branch and merge the rc-X.Y.Z in, then tag the branch (notice the **v** before the version number):
85+
86+
```shell
87+
git tag vX.Y.Z \-a \-m “Release X.Y.Z”
88+
```
89+
90+
91+
Push the new release commit and tags:
92+
93+
Note: DO NOT RUN THIS BELOW EXCEPT ON NEW FEATURE RELEASES.
94+
95+
```shell
96+
git checkout main
97+
98+
git merge rc-X.Y.X \# (this should NOT create a merge commit since the bump commit is the only difference)
99+
100+
git push origin main
101+
102+
git push \--tags
103+
```
104+
105+
### 10. Container images and distribution channels (flathub, homebrew)
106+
107+
Container images are built automatically on every tag creation and pushed to the GitHub Container Registry (ghcr.io).
108+
109+
Other distribution channels like flathub, homebrew, minikube, will be done by automatically opened PRs.
110+
111+
### 11. Announce on social media
112+
113+
Ask someone in the social team (Joaquim or Chris) to toot/tweet/post about it from the social media accounts.

docs/development/release-version.png

174 KB
Loading

0 commit comments

Comments
 (0)