This document describes the steps to cut a new release of go-coverage-report.
This project follows Semantic Versioning:
- Patch (
v1.x.Y): bug fixes only - Minor (
v1.Y.0): new features, backwards-compatible - Major (
vX.0.0): breaking changes
- Rename the
## [Unreleased]section to## [vX.Y.Z] - YYYY-MM-DD - Add a new
## [Unreleased]section at the top with the content_Nothing yet_ - Update the comparison links at the bottom of the file:
[Unreleased]: https://github.com/fgrosse/go-coverage-report/compare/vX.Y.Z...HEAD [vX.Y.Z]: https://github.com/fgrosse/go-coverage-report/compare/vA.B.C...vX.Y.Z
Bump the version to vX.Y.Z in:
action.yml— theversioninput default valueREADME.md— theversioninput default value in the inputs reference, and theuses:example in the usage section
git add CHANGELOG.md action.yml README.md
git commit -m "Release vX.Y.Z"
git push origin maingit tag -s vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.ZImportant: The tag must point to the commit that includes all the version bumps above. If you need to move the tag (e.g. you pushed it too early), run:
git tag -f -s vX.Y.Z -m "Release vX.Y.Z" git push --force origin vX.Y.ZOnly do this before running goreleaser, as force-pushing a tag after a GitHub Release is published will cause issues.
Extract the release notes for the current version from CHANGELOG.md and pass them to goreleaser:
VERSION=vX.Y.Z
awk "/^## \[$VERSION\]/{found=1; next} /^## \[v/{if(found) exit} found" CHANGELOG.md > /tmp/release-notes.md
goreleaser release --clean --release-notes=/tmp/release-notes.mdThis will:
- Build binaries for Linux, macOS, and Windows
- Create tarballs and a
checksums.txt - Publish a GitHub Release with the built artifacts
Important:
--release-notesdoes not currently reach the published release. Our.goreleaser.yamlsetschangelog.disable: true, which skips the pipeline stage that applies the flag, so goreleaser publishes the release with an empty body. This is silent, there is no warning.
Because of the above, attach the notes explicitly after goreleaser has published:
gh release edit "$VERSION" --notes-file=/tmp/release-notes.mdgh release view "$VERSION" --json tagName,isDraft,body --jq '.tagName, .isDraft, .body'
gh release view "$VERSION" --json assets --jq '.assets[].name'Check that the body is not empty, that the release is not a draft, and that all
nine assets are present (eight archives plus checksums.txt).
-
CHANGELOG.mdupdated (unreleased → version + date, new empty unreleased section, links) -
action.ymldefault version bumped -
README.mdversion references bumped - Changes committed and pushed to
main - Signed tag created and pushed (pointing to the version-bump commit)
-
goreleaser release --clean --release-notes=/tmp/release-notes.mdrun successfully - Release notes attached with
gh release edit(goreleaser leaves the body empty) - Release verified: non-empty body, not a draft, all nine assets uploaded