Complete guide for creating releases of Orthanc CLI using GoReleaser.
- Overview
- Prerequisites
- First-Time Setup
- Creating a Release
- Release Checklist
- What Gets Released
- Package Distribution
- Troubleshooting
Orthanc CLI uses GoReleaser for automated releases. When you push a git tag, GitHub Actions automatically:
- ✅ Runs all tests
- ✅ Builds binaries for multiple platforms (Linux/macOS, amd64/arm64)
- ✅ Creates distribution packages (DEB, RPM, APK)
- ✅ Generates checksums
- ✅ Creates a GitHub Release with all artifacts
- ✅ Updates the Homebrew tap
Prerelease Policy: All versions before v1.0.0 (v0.x.x) are automatically marked as prereleases.
- Go 1.25 or later
- Git with all changes committed
- Updated CHANGELOG.md
- All tests passing
-
Homebrew Tap Repository
- Create a public repository:
proencaj/homebrew-orthanc-cli - GitHub: https://github.com/new
- Create a public repository:
-
GitHub Personal Access Token
- Go to: https://github.com/settings/tokens
- Create token with
reposcope - Name it:
HOMEBREW_TAP_GITHUB_TOKEN
-
Add Token to Repository Secrets
- Go to: https://github.com/proencaj/orthanc-cli/settings/secrets/actions
- Add secret:
HOMEBREW_TAP_GITHUB_TOKEN
For signed DEB/RPM packages (recommended for production):
# Install GPG (macOS)
brew install gnupg
# Generate GPG key
gpg --full-generate-key
# Choose: RSA and RSA, 4096 bits, your name and email
# List keys to find KEY_ID
gpg --list-secret-keys --keyid-format=long
# Export private key
gpg --export-secret-keys YOUR_KEY_ID > gpg-private-key.asc
# Add to GitHub Secrets as GPG_KEY_FILE
# (Paste entire contents of gpg-private-key.asc)Note: Packages will be unsigned if GPG_KEY_FILE is not set (fine for development).
# macOS/Linux
brew install goreleaser
# Or use the Makefile
make install-goreleaser# Test GoReleaser configuration
make goreleaser-test
# Build a local snapshot (no tag required)
make goreleaser-snapshot
# Check the dist/ directory
ls -lh dist/# 1. Ensure all changes are committed
git status
# 2. Update CHANGELOG.md
vim CHANGELOG.md
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG for v0.2.0"
git push origin main
# 3. Create and push tag
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin v0.2.0
# 4. GitHub Actions handles the rest automatically!
# Monitor: https://github.com/proencaj/orthanc-cli/actionsUpdate CHANGELOG.md:
- Move items from
[Unreleased]to new version section - Add release date
- Update comparison links
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG for v0.2.0"
git push origin main# Run pre-release validation
make release-prepare
# This checks:
# - Working directory is clean
# - Required files exist
# - All tests pass
# - Code is formatted
# - No linting errors# Set version
VERSION="v0.2.0"
# Create annotated tag
git tag -a $VERSION -m "Release $VERSION"
# Push tag (triggers GitHub Actions workflow)
git push origin $VERSION- Go to: https://github.com/proencaj/orthanc-cli/actions
- Watch the "Release" workflow (usually 2-5 minutes)
- Wait for green checkmark ✅
- Check release page: https://github.com/proencaj/orthanc-cli/releases
- Verify all artifacts are present:
- Binary archives (linux/darwin, amd64/arm64)
- DEB packages
- RPM packages
- APK packages
- SHA256SUMS.txt
- Check Homebrew tap: https://github.com/proencaj/homebrew-orthanc-cli
# Test Homebrew (may take a few minutes to update)
brew upgrade orthanc-cli
orthanc --version
# Or test manual download
VERSION="v0.2.0"
curl -LO https://github.com/proencaj/orthanc-cli/releases/download/$VERSION/orthanc-cli-$VERSION-darwin-arm64.tar.gz
tar -xzf orthanc-cli-$VERSION-darwin-arm64.tar.gz
./orthanc --versionUse this checklist before creating a release:
- All changes committed and pushed to
main - Tests passing:
make test - Code formatted:
make fmt - Updated
CHANGELOG.mdwith new version - Version follows semantic versioning (e.g., v0.2.0)
- Run
make release-preparesuccessfully
- Created annotated tag:
git tag -a v0.2.0 -m "Release v0.2.0" - Pushed tag:
git push origin v0.2.0 - GitHub Actions workflow completed successfully
- All artifacts uploaded to GitHub Release
- Verified release on GitHub
- Tested installation (Homebrew and/or manual)
- Updated documentation if needed
- Announced release (if applicable)
- Closed related issues/milestones
orthanc-cli-VERSION-linux-amd64.tar.gzorthanc-cli-VERSION-linux-arm64.tar.gzorthanc-cli-VERSION-darwin-amd64.tar.gzorthanc-cli-VERSION-darwin-arm64.tar.gz
Each archive contains:
orthanc- Binary executableREADME.md- DocumentationLICENSE- License fileCHANGELOG.md- Changelog
Debian/Ubuntu (DEB):
orthanc-cli_VERSION_linux_amd64.deborthanc-cli_VERSION_linux_arm64.deb
CentOS/RHEL/Fedora (RPM):
orthanc-cli_VERSION_linux_amd64.rpmorthanc-cli_VERSION_linux_arm64.rpm
Alpine Linux (APK):
orthanc-cli_VERSION_linux_amd64.apkorthanc-cli_VERSION_linux_arm64.apk
SHA256SUMS.txt- Checksums for all artifacts- Homebrew formula (auto-updated in
proencaj/homebrew-orthanc-cli)
GitHub Release includes:
- Installation instructions (Homebrew, DEB, RPM, APK, manual)
- Changelog from commits (auto-generated)
- Download links for all artifacts
- Checksum verification instructions
brew install proencaj/orthanc-cliwget https://github.com/proencaj/orthanc-cli/releases/download/v0.2.0/orthanc-cli_0.2.0_linux_amd64.deb
sudo dpkg -i orthanc-cli_0.2.0_linux_amd64.debwget https://github.com/proencaj/orthanc-cli/releases/download/v0.2.0/orthanc-cli_0.2.0_linux_amd64.rpm
sudo rpm -i orthanc-cli_0.2.0_linux_amd64.rpm
# or
sudo dnf install orthanc-cli_0.2.0_linux_amd64.rpmwget https://github.com/proencaj/orthanc-cli/releases/download/v0.2.0/orthanc-cli_0.2.0_linux_amd64.apk
sudo apk add --allow-untrusted orthanc-cli_0.2.0_linux_amd64.apk# Download
curl -LO https://github.com/proencaj/orthanc-cli/releases/latest/download/orthanc-cli-VERSION-linux-amd64.tar.gz
# Extract
tar -xzf orthanc-cli-VERSION-linux-amd64.tar.gz
# Install
sudo mv orthanc /usr/local/bin/# Download checksums
wget https://github.com/proencaj/orthanc-cli/releases/download/v0.2.0/SHA256SUMS.txt
# Verify package
sha256sum -c SHA256SUMS.txt --ignore-missinggit status
git add .
git commit -m "fix: pre-release cleanup"# Run tests locally to see what's failing
make test
# Fix issues and re-tag
git tag -d v0.2.0 # Delete local tag
git push origin :refs/tags/v0.2.0 # Delete remote tag
# Fix, commit, and try againEnsure workflow has write permissions in .github/workflows/release.yml:
permissions:
contents: write
packages: write- Check
HOMEBREW_TAP_GITHUB_TOKENsecret exists - Verify token has
reposcope - Confirm
homebrew-orthanc-clirepository exists and is public - Check GitHub Actions logs for errors
# Delete tag locally
git tag -d v0.2.0
# Delete tag remotely
git push origin :refs/tags/v0.2.0
# Delete GitHub Release (via web UI or gh CLI)
gh release delete v0.2.0
# Fix issues, then re-create tag and push# Build snapshot (no tag required)
make goreleaser-snapshot
# Output goes to dist/ directory
ls -lh dist/If you get GPG errors during local testing:
# Option 1: Test without signing
goreleaser release --snapshot --clean --skip=publish
# Option 2: Set up GPG key locally
export GPG_KEY_FILE=/path/to/gpg-private-key.ascEnsure you've created and checked out the tag:
git tag -a v0.2.0 -m "Release v0.2.0"
git checkout v0.2.0
# Verify version in binary
make build
./bin/orthanc --version# Check what would be released
git log $(git describe --tags --abbrev=0)..HEAD --oneline
# View last release tag
git describe --tags --abbrev=0
# List all tags
git tag -l
# Delete local tag
git tag -d v0.2.0
# Delete remote tag
git push origin :refs/tags/v0.2.0
# Test GoReleaser config
make goreleaser-test
# Build local snapshot
make goreleaser-snapshot
# Run pre-release validation
make release-prepareThis project follows Semantic Versioning:
- MAJOR version (v1.0.0) - Incompatible API changes
- MINOR version (v0.2.0) - New functionality, backwards compatible
- PATCH version (v0.2.1) - Backwards compatible bug fixes
Prerelease Policy: All v0.x.x versions are marked as prereleases until v1.0.0.
- GoReleaser Documentation
- GitHub Actions Documentation
- Homebrew Tap Documentation
- Semantic Versioning
If you encounter issues with the release process:
- Check GitHub Actions logs for detailed errors
- Test locally with
make goreleaser-snapshot - Review this guide and .goreleaser.yaml
- Open an issue: https://github.com/proencaj/orthanc-cli/issues