|
1 | | -# Release processes |
| 1 | +# Release process |
2 | 2 |
|
3 | | -## GoReleaser (`cortextool` only) |
| 3 | +Releases are automated via the `Release` GitHub Actions workflow (`.github/workflows/release.yml`). Pushing a tag matching `v*` triggers it: it builds binaries with goreleaser, pushes Docker images to quay.io, and publishes the GitHub release with notes from `changelogs/${tag}.md`. |
4 | 4 |
|
5 | | -1. Create a changelog file in `changelog/` with the name of the tag e.g. `changelog/v0.3.0.md`. This will be used as the template for the release page in GitHub. |
6 | | -2. Create a new tag that follows semantic versioning: |
| 5 | +## Steps |
7 | 6 |
|
8 | | -```bash |
9 | | -$ tag=v0.3.0 |
10 | | -$ git tag -s "${tag}" -m "${tag}" |
11 | | -$ git push origin "${tag}" |
12 | | -``` |
| 7 | +1. **Open a PR** that adds: |
| 8 | + - An entry in `CHANGELOG.md` for the new version |
| 9 | + - A `changelogs/${tag}.md` file (used as the GitHub release body — see existing files for the format) |
13 | 10 |
|
14 | | -3. Run `$ goreleaser release --release-notes=changelogs/v0.3.0.md --clean` where the changelog file is the one created as part of step 1. |
15 | | -4. The docker image will be pushed automatically. |
| 11 | +2. **Once the PR is merged**, create a signed tag and push it: |
16 | 12 |
|
| 13 | + ```bash |
| 14 | + tag=v0.3.0 |
| 15 | + git checkout main && git pull origin main |
| 16 | + git tag -s "${tag}" -m "${tag}" |
| 17 | + git push origin "${tag}" |
| 18 | + ``` |
17 | 19 |
|
18 | | -## Manual (all the other binaries) |
| 20 | +3. **Watch the workflow** at https://github.com/cortexproject/cortex-tools/actions |
19 | 21 |
|
20 | | -1. Manually build and test the new additions |
21 | | -2. Create a new tag based on: |
22 | | - $ tag=v0.2.1 |
23 | | - $ git tag -s "${tag}" -m "${tag}" |
24 | | - $ git push origin "${tag}" |
| 22 | + On success: |
| 23 | + - Binaries for cortextool and benchtool (linux, mac-os, windows) are attached to the release |
| 24 | + - Docker images are pushed to `quay.io/cortexproject/cortex-tools:${tag}` and `quay.io/cortexproject/benchtool:${tag}` |
| 25 | + - The release notes include a Docker images section appended automatically |
25 | 26 |
|
26 | | -3. Create the binaries with `make cross`, they are in dist/ |
27 | | -4. Create the GitHub release, copy the release notes from the previous ones, and adjust as necessary. Upload the binaries created and click publish on the release. |
28 | | -5. The last step is creating and uploading the docker images. Use make image to create them and then tag them. Keep in mind that there is only 1 image for cortextool in Dockerhub at the moment. |
29 | | -6. Make sure to update the latest tag to the most recent version. |
| 27 | +## Required secrets |
| 28 | + |
| 29 | +The workflow uses two repository secrets: |
| 30 | + |
| 31 | +- `QUAY_USERNAME` |
| 32 | +- `QUAY_PASSWORD` |
| 33 | + |
| 34 | +`GITHUB_TOKEN` is provided automatically by Actions. |
0 commit comments