Releases¶
Automated release management with GoReleaser and GitHub Actions.
Release Process¶
Automated Releases¶
The project uses GoReleaser for automated, cross-platform releases triggered by Git tags:
- Tag a version:
git tag v1.0.0 - Push the tag:
git push origin v1.0.0 - GitHub Actions: Automatically builds and releases
- Artifacts: Binaries, archives, and checksums are published
Manual Releases¶
For testing or custom releases:
1 2 3 4 5 6 7 8 9 | |
Version Strategy¶
Semantic Versioning¶
Follow semantic versioning principles:
- MAJOR: Breaking changes (
v1.0.0→v2.0.0) - MINOR: New features, backward compatible (
v1.0.0→v1.1.0) - PATCH: Bug fixes (
v1.0.0→v1.0.1)
Pre-releases¶
Use pre-release identifiers for testing:
1 2 3 4 5 6 7 8 | |
Release Artifacts¶
Binary Distributions¶
GoReleaser creates optimized binaries for multiple platforms:
| Platform | Architecture | Binary Name |
|---|---|---|
| Linux | amd64 | cli-template_linux_amd64 |
| Linux | arm64 | cli-template_linux_arm64 |
| macOS | amd64 | cli-template_darwin_amd64 |
| macOS | arm64 | cli-template_darwin_arm64 |
| Windows | amd64 | cli-template_windows_amd64.exe |
Archives¶
Platform-specific archives with consistent naming:
- Linux/macOS:
.tar.gzformat - Windows:
.zipformat - Naming:
cli-template_OS_ARCHITECTURE.ext
Checksums¶
SHA256 checksums for all artifacts: - File: checksums.txt - Usage: Verify download integrity
1 2 | |
Build Configuration¶
GoReleaser Settings¶
Key configuration in .goreleaser.yaml:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Version Injection¶
Build-time variables are injected automatically:
1 2 3 4 5 | |
View version information:
1 | |
Distribution Channels¶
GitHub Releases¶
Primary distribution through GitHub Releases: - Automatic: Triggered by tags - Draft mode: Review before publishing - Release notes: Generated from commits
Homebrew¶
Automated Homebrew tap updates:
1 2 3 4 5 6 7 | |
Install via Homebrew:
1 2 | |
Container Registry¶
Docker images published to GitHub Container Registry:
1 2 3 4 5 6 7 8 | |
Release Notes¶
Changelog Generation¶
Automatic changelog from commit messages:
1 2 3 4 5 6 7 8 | |
Commit Message Format¶
Use conventional commits for better changelog:
1 2 3 4 5 6 7 8 | |
Release Workflow¶
Development Cycle¶
- Feature development on feature branches
- Pull request review and merge to main
- Version tag when ready for release
- Automated release via GitHub Actions
- Distribution to all channels
Release Checklist¶
Before tagging a release:
- All tests passing
- Documentation updated
- CHANGELOG.md reviewed
- Breaking changes documented
- Version number follows semantic versioning
1 2 3 | |
Tag Creation¶
1 2 3 4 5 6 | |
Troubleshooting¶
Failed Releases¶
Common issues and solutions:
GoReleaser validation fails:
1 2 3 4 5 | |
GitHub token issues:
1 2 3 4 5 | |
Build failures:
1 2 3 4 5 6 | |
Version Conflicts¶
Tag already exists:
1 2 3 4 5 6 7 8 | |
Pre-release cleanup:
1 2 3 4 5 | |
Best Practices¶
Release Timing¶
- Regular cadence: Monthly or bi-weekly releases
- Feature completion: Don't rush incomplete features
- Security fixes: Immediate patch releases
- Breaking changes: Major version bumps
Communication¶
- Release notes: Clear, user-focused descriptions
- Migration guides: For breaking changes
- Deprecation notices: Advance warning for removals
- Security advisories: For vulnerability fixes
Quality Assurance¶
- Testing: Comprehensive test suite before release
- Staging: Test snapshot builds
- Rollback plan: Ability to revert if needed
- Monitoring: Watch for issues post-release