Releasing
This document describes the release process for binmate.
Prerequisites
- Write access to the GitHub repository.
- All tests passing on the main branch.
Release process
1. Prepare the release
- Ensure all changes are merged to the
mainordevbranch. - Update the version number in relevant files (if needed).
- Update
CHANGELOG.md(if it exists) with release notes. - Ensure all tests pass:
go test ./....
2. Create a release tag
Create and push a version tag following semantic versioning (vMAJOR.MINOR.PATCH):
# Create a tag for the release
git tag -a v1.0.0 -m "Release v1.0.0"
# Push the tag to GitHub
git push origin v1.0.03. Automated release process
Once the tag is pushed, the following happens automatically:
- GitHub Actions triggers - The release workflow (
.github/workflows/release.yml) is triggered. - Tests run - All tests are executed with race detection enabled.
- GoReleaser builds - If tests pass, GoReleaser builds binaries for:
- Linux (amd64, arm64)
- macOS / Darwin (amd64, arm64)
- Checksums generated - SHA256 checksums are computed for all binaries.
- GitHub release created - A new GitHub release is created with:
- Release notes (auto-generated from commits)
- Binary archives for each platform
- Checksum file
- Installation instructions
4. Verify the release
- Go to the releases page.
- Verify the release was created successfully.
- Run post-release verification (see below).
Post-release verification
After a release is published, comprehensive end-to-end testing should be performed to ensure the release works correctly across all supported platforms and architectures.
Automated E2E testing
The repository includes automated E2E tests that can be run via GitHub Actions:
- Go to the E2E Tests workflow.
- Click Run workflow.
- Specify the version to test (e.g.
v1.0.0orlatest). - Select platforms and architectures to test (or use
allfor comprehensive testing). - Click Run workflow to start the tests.
The workflow will:
- Test installation via the install scripts (
install.shfor Unix,install.ps1for Windows). - Run 24 core functionality tests on each platform/architecture.
- Upload test logs as artifacts.
- Report pass/fail status for each combination.
Supported test combinations:
- Linux: amd64, arm64
- macOS: amd64 (Intel), arm64 (Apple Silicon)
- Windows: amd64, arm64
Manual local testing
You can also run E2E tests locally on your machine.
Unix (Linux/macOS)
# Test latest version
./e2e-test.sh
# Test specific version
./e2e-test.sh v1.0.0
# Or use an environment variable
BINMATE_VERSION=v1.0.0 ./e2e-test.shWindows (PowerShell)
# Test latest version
.\e2e-test.ps1
# Test specific version
.\e2e-test.ps1 -Version v1.0.0
# Or use an environment variable
$env:BINMATE_VERSION = "v1.0.0"
.\e2e-test.ps1Manual installation testing
For manual verification:
Unix (Linux/macOS)
# Test install.sh with latest version
curl -fsSL https://binmate.cturner8.dev/install.sh | bash
# Test install.sh with specific version
curl -fsSL https://binmate.cturner8.dev/install.sh | BINMATE_VERSION=v1.0.0 bash
# Test with custom install directory
curl -fsSL https://binmate.cturner8.dev/install.sh | BINMATE_INSTALL_DIR=/tmp/binmate-test bashWindows (PowerShell)
# Test install.ps1 with latest version
irm https://binmate.cturner8.dev/install.ps1 | iex
# Test install.ps1 with specific version
$env:BINMATE_VERSION = "v1.0.0"
irm https://binmate.cturner8.dev/install.ps1 | iex
# Test with custom install directory
$env:BINMATE_INSTALL_DIR = "C:\Temp\binmate-test"
irm https://binmate.cturner8.dev/install.ps1 | iexIssue tracking
To track verification progress, create a Post-Release Verification issue:
- Go to Issues → New Issue.
- Select the Post-Release Verification template.
- Fill in the version and release URL.
- Use the checklist to track testing progress for each platform.
- Link to automated E2E test results.
- Document any issues found.
- Close the issue once all verification is complete.
The template includes comprehensive checklists for:
- All 6 platform/architecture combinations
- Installation testing
- Core functionality testing
- Error handling verification
- Additional release quality checks
Release workflow details
Test workflow
The test workflow (.github/workflows/test.yml) runs on every push and pull request to the main/dev branches:
- Runs all tests with race detection.
- Generates code coverage reports.
- Uploads coverage to Codecov (if configured).
Release workflow
The release workflow (.github/workflows/release.yml) runs on version tags:
- Runs all tests first (fails if tests fail).
- Uses GoReleaser to build cross-platform binaries.
- Creates a GitHub release with binaries and checksums.
- Handles CGO requirements for SQLite3.
GoReleaser configuration
The .goreleaser.yml file configures:
- Platforms: Linux and macOS (Windows disabled due to CGO complexity).
- Architectures: amd64 and arm64.
- Archive format: tar.gz.
- Checksums: SHA256.
- Changelog: Auto-generated from GitHub commits with SHA suppression and linked PR references.
- Build metadata: version, commit, and build date injected via linker flags (
-X main.version,-X main.commit,-X main.date).
Troubleshooting
Release workflow fails
- Check the Actions tab for error details.
- Common issues:
- Tests failing - Fix tests before releasing.
- CGO cross-compilation errors - Ensure cross-compilation tools are installed.
- GoReleaser errors - Check
.goreleaser.ymlsyntax.
Build fails for a specific platform
If a specific platform build fails:
- Review the GoReleaser logs.
- Check the platform-specific environment variables in
.goreleaser.yml. - Verify cross-compilation tools are available.
Install script issues
If users report install script problems:
- Test the script locally:
bash install.sh. - Verify the GitHub release exists and contains all binaries.
- Check the checksum file is present and correct.
Version numbering
binmate follows Semantic Versioning:
- MAJOR version - Breaking changes.
- MINOR version - New features (backward compatible).
- PATCH version - Bug fixes (backward compatible).
Examples:
v1.0.0- Initial release.v1.1.0- New feature added.v1.1.1- Bug fix.v2.0.0- Breaking change.
Manual release (emergency)
If the automated release fails and you need to release manually:
Build binaries locally:
bash# Install GoReleaser go install github.com/goreleaser/goreleaser@latest # Build snapshot (test) goreleaser release --snapshot --clean # Build actual release (with tag) goreleaser release --cleanCreate the GitHub release manually:
- Go to Releases → New Release.
- Upload binaries and checksums.
- Add release notes.
Manual release build
To verify a local build, run the following.
Basic build:
go build -o /tmp/binmateBuild with additional metadata flags (normally set automatically by GoReleaser):
go build -o /tmp/binmate \
-ldflags "-X main.version=dev-local -X main.commit=$(git rev-parse --short HEAD) -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" .Post-release
- Announce the release in appropriate channels.
- Update documentation if needed.
- Monitor for issues reported by users.