-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from sapcc/goreleaser
- Loading branch information
Showing
4 changed files
with
45 additions
and
20 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,45 @@ | ||
# Release Guide | ||
|
||
1. Ensure local `master` branch is up to date with `origin/master`. | ||
2. Ensure all checks are passing: `make check`. | ||
3. Update the [`CHANGELOG`](./CHANGELOG.md) as appropriate. | ||
We use [GoReleaser][goreleaser] and GitHub workflows for automating the release | ||
process. Follow the instructions below for creating a new release. | ||
|
||
1. Ensure local `master` branch is up to date with `origin/master`: | ||
|
||
```sh | ||
git fetch --tags && git pull --tags | ||
``` | ||
|
||
2. Ensure all checks are passing: | ||
|
||
```sh | ||
make check | ||
``` | ||
|
||
3. Update the [`CHANGELOG`](./CHANGELOG.md). | ||
Make sure that the format is consistent especially the version heading. | ||
We follow [semantic versioning][semver] for our releases. | ||
You can check if the file format is correct by running `make build/release-info` and examining `make build/release-info`. | ||
|
||
You can check if the file format is correct by running [`release-info`][release-info] for the new version: | ||
|
||
```sh | ||
go install github.com/sapcc/go-bits/tools/release-info@latest | ||
release-info CHANGELOG.md X.Y.Z | ||
``` | ||
|
||
where `X.Y.Z` is the version that you are planning to release. | ||
|
||
4. Commit the updated changelog with message: `Release <version>` | ||
5. Create and push a new Git tag. | ||
Note that tags are prefixed with `v` and the GitHub release workflow is triggered for tags that match the `v[0-9]+.[0-9]+.[0-9]+` [gh-pattern]. | ||
A [lightweight tag][lightweight-tags] is sufficient as GoReleaser will update the release description using the release notes generated by [release-info]. | ||
5. Create and push a new Git tag: | ||
|
||
```sh | ||
git tag vX.Y.Z | ||
git push --tags | ||
``` | ||
|
||
> [!IMPORTANT] | ||
> Tags are prefixed with `v` and the GitHub release workflow is triggered for tags that match the `v[0-9]+.[0-9]+.[0-9]+` [gh-pattern]. | ||
|
||
[release-info]: https://github.com/sapcc/go-bits/tree/master/tools/release-info | ||
[lightweight-tags]: https://git-scm.com/book/en/v2/Git-Basics-Tagging#_lightweight_tags | ||
[semver]: https://semver.org/spec/v2.0.0.html | ||
[gh-pattern]: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags | ||
[goreleaser]: https://github.com/goreleaser/goreleaser |