- Install
goreleaser. Refer to its docs. - Set a
GITHUB_TOKENenvironment variable. Refer togoreleaserdocs for information.export GITHUB_TOKEN=$(gh auth token)
- Update
CHANGELOG.md.- Mention recent changes.
- Set a version if there is not one.
- Set a release date.
- Set version in
version.go. - Commit
CHANGELOG.mdandversion.go. - Tag the release:
git tag -a v1.2.3 -m v1.2.3. - Push the tag:
git push origin v1.2.3. - Run
goreleaser release. - Edit the release on GitHub to include the changelog changes.
- Make sure to push the rest of your changes.