Release Guide
This document describes how to create a new release for go-crypto-wallet.
Overview
Releases are automated using GoReleaser and GitHub Actions. When a tag matching v* is pushed, the release workflow automatically:
- Builds binaries for Linux/macOS (amd64/arm64)
- Generates changelog from commit messages
- Creates a GitHub Release with artifacts
Quick Start
# 1. Ensure on main branch with latest changes
git checkout main && git pull origin main
# 2. Check prerequisites
make release-check
# 3. Create and push tag
make release-tag VERSION=v6.1.0
# 4. Monitor workflow
# https://github.com/hiromaily/go-crypto-wallet/actions/workflows/release.ymlDetailed Process
Step 1: Prepare for Release
Ensure all changes are merged to main:
git checkout main
git pull origin mainVerify there are no uncommitted changes:
git statusStep 2: Determine Version
This project follows Semantic Versioning:
| Change Type | Version Bump | Example |
|---|---|---|
| Breaking changes | MAJOR | v5.0.0 → v6.0.0 |
| New features (backward compatible) | MINOR | v6.0.0 → v6.1.0 |
| Bug fixes | PATCH | v6.1.0 → v6.1.1 |
Check current version and commits since last release:
make release-checkStep 3: Create Release Tag
Create an annotated tag and push:
# Using Makefile (recommended)
make release-tag VERSION=v6.1.0
# Or manually
git tag -a v6.1.0 -m "Release v6.1.0"
git push origin v6.1.0Step 4: Monitor Release Workflow
The GitHub Actions workflow will automatically run:
Check workflow status:
bashgh run list --workflow=release.yml --limit=3Watch live progress:
bashgh run watch <run-id>View on GitHub: https://github.com/hiromaily/go-crypto-wallet/actions/workflows/release.yml
Step 5: Verify Release
Once the workflow completes:
Check release page: https://github.com/hiromaily/go-crypto-wallet/releases
Verify artifacts:
bashgh release view v6.1.0
Release Artifacts
Each release includes:
| Artifact | Description |
|---|---|
go-crypto-wallet_X.Y.Z_linux_amd64.tar.gz | Linux x64 |
go-crypto-wallet_X.Y.Z_linux_arm64.tar.gz | Linux ARM64 |
go-crypto-wallet_X.Y.Z_darwin_amd64.tar.gz | macOS x64 |
go-crypto-wallet_X.Y.Z_darwin_arm64.tar.gz | macOS ARM64 (Apple Silicon) |
checksums.txt | SHA256 checksums |
Each archive contains:
watch- Watch wallet binary (online)keygen- Keygen wallet binary (offline)sign-auth1- Sign wallet binary for auth1 (offline)sign-auth2- Sign wallet binary for auth2 (offline)LICENSEREADME.mdARCHITECTURE.md
Changelog Generation
Changelog is automatically generated from commit messages using Conventional Commits:
| Commit Type | Changelog Section |
|---|---|
feat | 🚀 Features |
fix | 🐛 Bug Fixes |
refactor | 🔄 Refactoring |
deps, build | 📦 Dependencies |
| Other | Others |
Excluded from changelog:
docs:commitstest:commitschore:commitsci:commits- Merge commits
Makefile Targets
| Target | Description |
|---|---|
make release-check | Check release prerequisites |
make release-dry-run | Dry run GoReleaser locally |
make release-tag VERSION=vX.Y.Z | Create and push release tag |
make release-list | List recent releases |
make release-help | Show release documentation |
Local Testing
Test GoReleaser locally before pushing a tag:
# Install GoReleaser (if not installed)
go install github.com/goreleaser/goreleaser/v2@latest
# Dry run (builds but doesn't publish)
make release-dry-run
# Or directly
goreleaser release --snapshot --clean --skip=publishTroubleshooting
Workflow Failed
Check workflow logs:
bashgh run view <run-id> --log-failedCommon issues:
- Build errors: Run
make check-buildlocally - CGO issues: Ensure code is CGO-free compatible
- Tag already exists: Delete and recreate if needed
- Build errors: Run
Delete a Tag
If you need to delete a tag (e.g., wrong version):
# Delete local tag
git tag -d v6.1.0
# Delete remote tag
git push origin --delete v6.1.0Note: If a release was created, delete it first on GitHub.
Re-run Failed Release
If the workflow failed after tag was pushed:
- Fix the issue in code
- Delete the tag (local and remote)
- Create a new commit with the fix
- Create and push the tag again
Configuration Files
| File | Purpose |
|---|---|
.goreleaser.yml | GoReleaser configuration |
.github/workflows/release.yml | GitHub Actions workflow |
make/release.mk | Makefile release targets |
Related Documentation
- Conventional Commits
- Semantic Versioning
- GoReleaser Documentation
- CONTRIBUTING.md - Commit message conventions