This document describes the release process for gac (Google Admin Client).
Releases are automated using GoReleaser and GitHub Actions. When a version tag is pushed to GitHub, the release workflow automatically:
- Builds binaries for multiple platforms (Linux, macOS × amd64/arm64)
- Creates Docker images for amd64 and arm64 architectures
- Generates checksums for all artifacts
- Creates a GitHub release with changelog
- Publishes Docker images to GitHub Container Registry (ghcr.io)
- Write access to the repository
- Git configured with your GitHub credentials
- Clean working directory (no uncommitted changes)
- All tests passing
We follow Semantic Versioning:
- MAJOR version (v1.0.0): Incompatible API changes
- MINOR version (v0.1.0): New functionality, backwards-compatible
- PATCH version (v0.0.1): Backwards-compatible bug fixes
- Alpha:
v0.1.0-alpha.1- Early testing, unstable - Beta:
v0.1.0-beta.1- Feature complete, testing - RC:
v0.1.0-rc.1- Release candidate
# Ensure you're on the main branch with latest changes
git checkout main
git pull origin main
# Ensure all tests pass
make test
# Run all checks (fmt, vet, lint, security scan)
make check
# Test the release configuration locally
make release-test# Create an annotated tag with semantic version
git tag -a v0.1.0 -m "Release v0.1.0"
# Push the tag to GitHub (this triggers the release workflow)
git push origin v0.1.0Alternative: Create tag with detailed message
git tag -a v0.1.0 -m "Release v0.1.0
New Features:
- Feature 1
- Feature 2
Bug Fixes:
- Fix 1
- Fix 2
"
git push origin v0.1.0- Go to Actions tab in GitHub: https://github.com/acockrell/google-admin-client/actions
- Watch the "Release" workflow execution
- Verify all jobs complete successfully
Once the workflow completes:
-
Check GitHub Release: https://github.com/acockrell/google-admin-client/releases
- Verify release notes and changelog
- Verify all platform binaries are attached
- Verify checksums.txt is present
-
Check Docker Images: https://github.com/acockrell?tab=packages
docker pull ghcr.io/acockrell/gac:v0.1.0 docker run --rm ghcr.io/acockrell/gac:v0.1.0 --help
-
Test a Binary:
# Download and test (example for macOS arm64) curl -Lo gac.tar.gz https://github.com/acockrell/google-admin-client/releases/download/v0.1.0/gac_Darwin_arm64.tar.gz tar xzf gac.tar.gz ./gac --help
Before creating a release, test the build process locally:
# Build snapshot (no tag required)
make release-snapshot
# Test full release process without publishing
make release-test
# Check generated artifacts
ls -lh dist/GoReleaser automatically generates changelogs from commit messages using Conventional Commits.
<type>(<scope>): <subject>
<body>
<footer>
Commits are grouped in the changelog by type:
- feat: New features (appears under "Features")
- fix: Bug fixes (appears under "Bug Fixes")
- sec: Security updates (appears under "Security Updates")
- perf: Performance improvements (appears under "Performance Improvements")
- docs: Documentation changes (excluded from changelog)
- test: Test changes (excluded from changelog)
- chore: Maintenance tasks (excluded from changelog)
# Feature
git commit -m "feat: add user suspension command"
# Bug fix
git commit -m "fix: correct email validation regex"
# Security update
git commit -m "sec: update dependencies with CVE fixes"
# Breaking change
git commit -m "feat!: remove deprecated --cache flag
BREAKING CHANGE: The --cache flag has been removed. Use --cache-file instead."The release workflow (.github/workflows/release.yml) performs these steps:
- Checkout: Fetch repository with full git history
- Setup Go: Install Go 1.25
- Cache: Cache Go modules for faster builds
- Docker Setup: Configure QEMU and Buildx for multi-arch images
- Registry Login: Authenticate to GitHub Container Registry
- GoReleaser: Build, package, and publish release
- Upload Artifacts: Save build artifacts
| Platform | Architectures |
|---|---|
| Linux | amd64, arm64 |
| macOS | amd64, arm64 |
Images are published to GitHub Container Registry:
ghcr.io/acockrell/gac:v0.1.0(versioned)ghcr.io/acockrell/gac:latest(latest release)ghcr.io/acockrell/gac:v0.1.0-amd64(platform-specific)ghcr.io/acockrell/gac:v0.1.0-arm64(platform-specific)
Check the workflow logs:
- Go to Actions tab
- Click on the failed workflow
- Expand failed job to see error details
Common issues:
- Tests failing: Run
make testlocally to reproduce - Build failing: Run
make release-snapshotlocally to debug - Docker build failing: Ensure
Dockerfile.goreleaseris valid - Permission denied: Verify GITHUB_TOKEN has appropriate permissions
# Delete local tag
git tag -d v0.1.0
# Delete remote tag (if pushed)
git push origin :refs/tags/v0.1.0
# Create new tag
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0# Validate configuration
goreleaser check
# Test with environment variables
export GITHUB_REPOSITORY_OWNER=acockrell
goreleaser check- Verify workflow completed successfully
- Check GitHub Packages: https://github.com/acockrell?tab=packages
- Ensure Docker steps didn't fail in workflow logs
- Verify GITHUB_TOKEN permissions include
packages: write
For urgent bug fixes on a released version:
# Create hotfix branch from tag
git checkout -b hotfix/v0.1.1 v0.1.0
# Make fixes and commit
git commit -m "fix: critical bug in user creation"
# Merge back to main
git checkout main
git merge --no-ff hotfix/v0.1.1
# Tag and release
git tag -a v0.1.1 -m "Hotfix v0.1.1: Fix critical bug"
git push origin main v0.1.1
# Delete hotfix branch
git branch -d hotfix/v0.1.1If a release has critical issues:
- Delete the GitHub release (via GitHub UI)
- Delete the git tag:
git push --delete origin v0.1.0 git tag -d v0.1.0
- Delete Docker images (via GitHub Packages UI)
- Fix the issue and create a new patch release
If GitHub Actions is unavailable:
# Ensure goreleaser is installed
go install github.com/goreleaser/goreleaser/v2@latest
# Set required environment variables
export GITHUB_TOKEN="your-github-token"
export GITHUB_REPOSITORY_OWNER=acockrell
# Create release (requires git tag)
git tag -a v0.1.0 -m "Release v0.1.0"
goreleaser release --cleanAfter a successful release:
-
Announce the release (if applicable):
- Update project README if needed
- Post to team chat/slack
- Update documentation site
-
Update TODO.md: Mark release-related tasks as complete
-
Monitor for issues: Watch for bug reports on the new version