This document describes the release process for the tokenizer project.
Before creating a release, ensure you have:
- GoReleaser installed:
go install github.com/goreleaser/goreleaser@latest - GitHub CLI installed:
brew install gh(or see installation docs) - Write access to the repository
- A GitHub personal access token with
reposcope
- Ensure all changes are committed and pushed to the main branch
- Run tests to ensure everything is working:
make test-all
- Update documentation if needed:
make generate
Create and push a new version tag:
# For a new patch release (e.g., v1.0.0 -> v1.0.1)
make tag VERSION=v1.0.1
# For a new minor release (e.g., v1.0.0 -> v1.1.0)
make tag VERSION=v1.1.0
# For a new major release (e.g., v1.0.0 -> v2.0.0)
make tag VERSION=v2.0.0Push the tag to GitHub:
git push origin v1.0.1 # Replace with your versionThe GitHub Actions workflow will automatically:
- Run all tests
- Build binaries for multiple platforms
- Create a GitHub release with:
- Automated changelog based on commit messages
- Binary downloads for all platforms
- Checksums file
- Check the Releases page to ensure the release was created
- Download and test a binary to ensure it works correctly:
# Download the binary for your platform curl -L https://github.com/agentstation/tokenizer/releases/download/v1.0.1/tokenizer_1.0.1_darwin_arm64.tar.gz | tar xz # Test it ./tokenizer version
- Update any documentation that references the version
- Announce the release (if applicable)
- Update any dependent projects
If the automated release fails, you can create a release manually:
# Test the release process locally
make release-snapshot
# Create the actual release
GITHUB_TOKEN=your_token_here make releaseWe follow Semantic Versioning:
- MAJOR version (X.0.0) - Incompatible API changes
- MINOR version (0.X.0) - New functionality, backwards compatible
- PATCH version (0.0.X) - Bug fixes, backwards compatible
For better changelogs, use conventional commit messages:
feat:- New features (triggers MINOR version bump)fix:- Bug fixes (triggers PATCH version bump)perf:- Performance improvementsdocs:- Documentation changeschore:- Maintenance taskstest:- Test additions/changes
Breaking changes should include ! after the type or BREAKING CHANGE: in the footer.
Example:
feat!: remove deprecated API endpoints
BREAKING CHANGE: The /api/v1/encode endpoint has been removed.
Use /api/v2/encode instead.
- Check the Actions tab for error details
- Ensure your tag follows the
v*pattern (e.g.,v1.0.0) - Verify GitHub token permissions
- Run
goreleaser checkto validate configuration - Test locally with
make release-snapshot - Check GoReleaser logs for specific errors
- Ensure CGO is disabled in the build (check
.goreleaser.yaml) - Test on the target platform
- Check for missing dependencies
If a release has critical issues:
- Delete the release from GitHub (keep the tag)
- Fix the issues
- Create a new patch release with the fixes
Never delete or modify existing tags that have been published.