This document explains how to release a new version of the Civo CLI.
The Civo CLI uses GoReleaser with GitHub Actions to automate the release process. When a Git tag matching the pattern v*.*.* is pushed, the release workflow automatically builds and distributes the CLI across multiple platforms and package managers.
Before creating a release, ensure:
- All changes are merged to the
masterbranch - All tests pass locally:
make test - The CI pipeline is green on the master branch
- You have push permissions to the repository
Ensure the master branch is in a releasable state:
git checkout master
git pull origin master
make testCreate a tag following semantic versioning (v{MAJOR}.{MINOR}.{PATCH}):
git tag v1.2.3
git push origin v1.2.3Once the tag is pushed:
- Go to the Actions tab in GitHub
- Watch the "goreleaser" workflow run
- The workflow will:
- Build binaries for all supported platforms
- Create Docker images and push to Docker Hub
- Generate Linux packages (DEB/RPM)
- Create a Homebrew formula PR
- Create a draft GitHub release
- Go to the Releases page
- Find the draft release created by GoReleaser
- Review the auto-generated changelog
- Edit release notes if needed
- Click "Publish release"
After the release is published:
- Go to the civo/homebrew-tools repository
- Find the PR created by civobot (branch:
civo-{VERSION}) - Review and merge the PR
The CLI is built for the following platforms:
| OS | Architectures |
|---|---|
| Linux | 386, amd64, arm, arm64 |
| macOS | amd64, arm64 |
| Windows | amd64, arm64 |
Binaries are packaged as:
.tar.gzfor Linux and macOS.zipfor Windows
Docker images are pushed to Docker Hub with two tags:
civo/cli:latest- Always points to the latest releasecivo/cli:v{VERSION}- Version-specific tag
The image is based on Alpine Linux and includes kubectl pre-installed.
- DEB packages for Debian/Ubuntu systems
- RPM packages for RedHat/CentOS/Fedora systems
A PR is automatically created to update the Homebrew formula in the civo/homebrew-tools tap.
A SHA256 checksums file is generated for all artifacts.
The version is derived from Git tags at build time. There is no version file to update manually.
Version information is injected via ldflags during compilation:
VersionCli- The version number (from Git tag)CommitCli- The Git commit hashDateCli- The build date
Users can check the installed version with:
civo version # Shows: Civo CLI v{VERSION}
civo version -v # Shows full build info including commit and date- Check the workflow logs in the Actions tab
- Common issues:
- Docker Hub authentication failed - verify
DOCKER_USERNAMEandDOCKER_PASSWORDsecrets - GitHub token expired - regenerate
GORELEASER_GITHUB_TOKEN - GoReleaser config error - run
goreleaser checklocally
- Docker Hub authentication failed - verify
If you need to re-release the same version:
git tag -d v1.2.3 # Delete local tag
git push origin :refs/tags/v1.2.3 # Delete remote tag
git tag v1.2.3 # Recreate tag
git push origin v1.2.3 # Push new tagVerify the GORELEASER_GITHUB_TOKEN has write access to the civo/homebrew-tools repository.