Releases
This guide explains how to cut a datumctl release locally with GoReleaser and how the GitHub Actions workflow publishes the official artifacts.
Local workflow
Section titled “Local workflow”- Prepare the repo
- Ensure
git statusis clean (GoReleaser refuses to run with dirty trees unless you explicitly use--snapshot). - Install the required tooling: supported Go version (see
go.mod) and GoReleaser v2.
- Ensure
- Dry-run the release
- Run
goreleaser release --snapshot --clean.
The--snapshotflag skips publishing and the--cleanflag wipesdist/before starting. - The docs generation script (
scripts/generate-cli-docs.sh) executes as part of thebeforehooks, producing.generated/datumctl-cli-docs.tar.gz. That tarball is registered as an extra release file, so the real release will upload it automatically.
- Run
- Tag and release
- Create a semver tag (e.g.
git tag v0.10.0 && git push origin v0.10.0). - Run
goreleaser release --cleanif you need to publish from your machine. Otherwise, let CI handle publishing after you push the tag.
- Create a semver tag (e.g.
CI/CD pipeline
Section titled “CI/CD pipeline”- The workflow at
.github/workflows/release.yamltriggers on every pushed tag. - Steps executed on
ubuntu-latest:- Checkout the repository with full history.
- Install Syft (required for SBOMs) and set up the stable Go toolchain.
- Run
goreleaser release --cleanviagoreleaser/goreleaser-action@v6.
- GoReleaser runs the same hooks as your local invocation, so the generated CLI docs tarball, archives, packages, SBOMs, and checksums are all attached to the GitHub release. The action uses
secrets/TAP_TOKENforGITHUB_TOKEN.
Tips and troubleshooting
Section titled “Tips and troubleshooting”- If GoReleaser fails immediately with
dist is not empty, remove the folder or keep using--clean. - Network access is required for
go mod tidy(firstbeforehook); if you are offline use--skip=beforefor local experimentation, but re-run the full flow before tagging. - After the release completes you can inspect
.generated/cli-docs/or.generated/datumctl-cli-docs.tar.gzto verify the CLI documentation bundle.