This document outlines the release process for Defuddle Go, including both the Go library and CLI tool.
Defuddle Go uses automated releases through GitHub Actions and GoReleaser. The process is triggered by pushing a version tag to the repository.
The release process consists of:
- Testing: Runs comprehensive tests on Go 1.26
- Building: Cross-compiles binaries for multiple platforms (Linux, macOS, Windows)
- Packaging: Creates archives with appropriate formats for each platform
- Publishing: Releases to GitHub with generated changelog and assets
- Checksums: Generates checksums for all release artifacts
The automated build creates binaries for:
- Linux: 386, amd64, arm, arm64
- macOS (Darwin): amd64, arm64
- Windows: 386, amd64
Defuddle Go follows Semantic Versioning (SemVer):
- MAJOR version: Incompatible API changes
- MINOR version: Backward-compatible functionality additions
- PATCH version: Backward-compatible bug fixes
- Release versions:
v1.2.3 - Pre-release versions:
v1.2.3-alpha.1,v1.2.3-beta.1,v1.2.3-rc.1
- Repository Access: Write access to the repository
- Clean State: All changes committed and pushed to main branch
- Tests Passing: All CI tests must pass
- Version Updated: Update version in
cmd/defuddle/main.goif needed
# Ensure you're on the main branch and up to date
git checkout main
git pull origin main
# Run tests locally
task test
# Test CLI build
task build-cli
./bin/defuddle --versionUpdate the version in cmd/defuddle/main.go:
var (
version = "0.2.0" // Update this
)Commit the version change:
git add cmd/defuddle/main.go
git commit -m "feat: bump version to v0.2.0"
git push origin main# Create the release tag
task tag VERSION=v0.2.0This command will:
- Create an annotated tag
- Push the tag to GitHub
- Trigger the automated release workflow
- Check the Actions tab for the release workflow
- Verify the release appears in Releases
- Test one of the pre-built binaries
If you prefer manual tag creation:
# Create annotated tag
git tag -a v0.2.0 -m "Release v0.2.0"
# Push tag to trigger release
git push origin v0.2.0Test the release build locally without publishing:
# Install GoReleaser if not already installed
task install-goreleaser
# Test release configuration
task snapshot
# Create a snapshot release
task snapshotFor major releases, consider creating a pre-release:
# Create pre-release tag
git tag -a v1.0.0-rc.1 -m "Release candidate v1.0.0-rc.1"
git push origin v1.0.0-rc.1GoReleaser will automatically mark versions with -alpha, -beta, -rc as pre-releases.
- All tests passing locally (
task test) - CLI builds successfully (
task build-cli) - Version updated in
cmd/defuddle/main.go(if needed) - CHANGELOG.md updated (optional, auto-generated)
- README.md examples tested
- No breaking changes (or properly documented)
- Release workflow completed successfully
- GitHub release created with proper assets
- Release notes generated correctly
- Pre-built binaries work on different platforms
-
go installworks with new version - Documentation updated if needed
- Check Action Logs: Review the GitHub Actions logs for errors
- Test Locally: Run
task snapshotto check GoReleaser configuration - Tag Issues: Ensure tag follows
v*pattern and is properly annotated
If release assets are missing:
- Check GoReleaser configuration in
.goreleaser.yml - Verify build targets in the
buildssection - Re-run release workflow if needed
If version conflicts occur:
- Delete the problematic tag:
git tag -d v0.2.0 && git push origin :refs/tags/v0.2.0 - Fix version issues
- Recreate the tag
If a release needs to be rolled back:
- Mark as Pre-release: Edit the GitHub release and mark as pre-release
- Delete Release: Delete the release from GitHub (this won't delete the tag)
- Delete Tag: Remove the tag if necessary
- Fix Issues: Address the problems
- Create New Release: Follow normal release process
For urgent fixes:
- Create hotfix branch from the problematic release tag
- Apply minimal fixes
- Update patch version
- Create new release tag
- Follow normal release process
For questions about the release process, please:
- Open an issue on GitHub
- Contact the maintainers
- Check the GitHub Actions documentation
Note: This release process is automated and designed to minimize manual intervention. Always test locally before creating releases.