This document describes how to release new versions of iflow-cli-docker using GoReleaser.
-
Install GoReleaser:
go install github.com/goreleaser/goreleaser/v2@latest
-
Ensure you have proper GitHub permissions:
- Write access to the repository
- Ability to create releases
- Update CHANGELOG_SQLITE.md with changes for the new version
- Commit all changes:
git add . git commit -m "chore: prepare for release vX.Y.Z"
# Create an annotated tag
git tag -a v1.0.0 -m "Release v1.0.0"
# Push the tag
git push origin v1.0.0Once you push a tag matching v*.*.*, GitHub Actions will automatically:
- Build binaries for multiple platforms (Linux, macOS, Windows)
- Create checksums
- Generate a changelog
- Create a GitHub release
- Upload all artifacts
If you need to create a release manually:
# Ensure you're on the tagged commit
git checkout v1.0.0
# Create the release
GITHUB_TOKEN=your_token_here goreleaser release --cleanBefore creating a real release, you can test locally:
make test-releaseThis creates a local build without publishing:
make snapshotThe binaries will be in the dist/ directory.
We follow Semantic Versioning:
- MAJOR version (X.0.0): Incompatible API changes
- MINOR version (0.X.0): New functionality in a backwards compatible manner
- PATCH version (0.0.X): Backwards compatible bug fixes
GoReleaser builds for:
- Linux: amd64, arm64
- macOS: amd64 (Intel), arm64 (Apple Silicon)
- Windows: amd64
Each release includes:
- Binaries: Compressed archives for each platform
- Checksums:
checksums.txtfor verification - Changelog: Auto-generated from commit messages
- Source Code: GitHub automatically includes source archives
- Check the GitHub Actions logs
- Test locally with
make snapshot - Verify
.goreleaser.yamlconfiguration
The version is determined by the Git tag. Ensure you:
- Use the correct tag format:
vX.Y.Z - Push the tag to GitHub
If CGO is required (for SQLite):
# On macOS
brew install gcc
# On Ubuntu/Debian
sudo apt-get install build-essentialAfter a successful release:
- Announce the release (if applicable)
- Update documentation if needed
- Close related issues/PRs
For development, use:
# Build with dev version info
make dev-build
# Or directly with go
go build -ldflags "-X github.com/cc11001100/iflow-cli-docker/cmd.version=dev" .The release workflow is defined in .github/workflows/release.yml:
on:
push:
tags:
- 'v*.*.*'This triggers on any tag starting with v followed by semver format.
If a release has issues:
- Delete the GitHub release
- Delete the tag locally and remotely:
git tag -d v1.0.0 git push origin :refs/tags/v1.0.0
- Fix the issues
- Create a new patch version