# GitHub Release Guide - CLI Binary
This guide walks through creating a GitHub release with pre-built binaries for all platforms.
## Prerequisites
- GitHub CLI (`gh`) installed
- Rust toolchain for cross-compilation
- GitHub repository access
## Quick Release (Automated)
```bash
# Run the automated release script
./scripts/release-cli-binary.sh v1.0.0
```
This script will:
1. Build binaries for all platforms
2. Calculate SHA256 checksums
3. Create GitHub release
4. Upload all binaries
5. Generate release notes
## Manual Release Process
### Step 1: Build Binaries for All Platforms
```bash
cd .distributions/10-cli-binary
# Linux x86_64
cargo build --release --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/claude-priority claude-priority-linux-x86_64
# Linux aarch64 (ARM64)
cargo build --release --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/claude-priority claude-priority-linux-aarch64
# macOS Intel
cargo build --release --target x86_64-apple-darwin
cp target/x86_64-apple-darwin/release/claude-priority claude-priority-macos-x86_64
# macOS Apple Silicon
cargo build --release --target aarch64-apple-darwin
cp target/aarch64-apple-darwin/release/claude-priority claude-priority-macos-aarch64
# Windows x86_64
cargo build --release --target x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/release/claude-priority.exe claude-priority-windows-x86_64.exe
```
**Cross-compilation setup** (if needed):
```bash
# Add targets
rustup target add x86_64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
rustup target add x86_64-pc-windows-msvc
# Install cross-compilation tools
cargo install cross
```
### Step 2: Calculate Checksums
```bash
# Generate SHA256 for all binaries
sha256sum claude-priority-* > checksums.txt
# Or on macOS:
shasum -a 256 claude-priority-* > checksums.txt
```
Example checksums.txt:
```
a1b2c3d4... claude-priority-linux-x86_64
e5f6g7h8... claude-priority-linux-aarch64
i9j0k1l2... claude-priority-macos-x86_64
m3n4o5p6... claude-priority-macos-aarch64
q7r8s9t0... claude-priority-windows-x86_64.exe
```
### Step 3: Create GitHub Release
```bash
# Create release with gh CLI
gh release create v1.0.0 \
--title "v1.0.0 - Initial CLI Binary Release" \
--notes-file RELEASE_NOTES.md \
claude-priority-linux-x86_64 \
claude-priority-linux-aarch64 \
claude-priority-macos-x86_64 \
claude-priority-macos-aarch64 \
claude-priority-windows-x86_64.exe \
checksums.txt
```
### Step 4: Verify Release
```bash
# Check release was created
gh release view v1.0.0
# Test download
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
./claude-priority-linux-x86_64 --version
```
## Release Notes Template
Create `RELEASE_NOTES.md`:
```markdown
# Claude Priority CLI v1.0.0
## 🎉 Initial Release
Fast, cross-platform CLI validator for Claude Code plugins written in Rust.
## ✨ Features
- **10x faster** than bash implementation
- **Cross-platform** - Linux, macOS, Windows (5 architectures)
- **Complete validation** - naming, JSON, frontmatter
- **Beautiful output** - colored terminal messages
- **CI/CD ready** - perfect for GitHub Actions
## 📦 Installation
### Download Binary
**Linux (x86_64):**
```bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
sudo mv claude-priority-linux-x86_64 /usr/local/bin/claude-priority
```
**macOS (Apple Silicon):**
```bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-macos-aarch64
chmod +x claude-priority-macos-aarch64
sudo mv claude-priority-macos-aarch64 /usr/local/bin/claude-priority
```
**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri "https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/claude-priority-windows-x86_64.exe" -OutFile "claude-priority.exe"
```
### Or Install via Package Manager
```bash
# Homebrew
brew install zenterflow/tap/claude-priority
# Cargo
cargo install claude-priority
# Chocolatey (Windows)
choco install claude-priority
# Snap (Linux)
snap install claude-priority
# AUR (Arch Linux)
yay -S claude-priority
```
## 🚀 Usage
```bash
# Validate a plugin
claude-priority validate /path/to/plugin
# Validate current directory
claude-priority validate .
# Skip specific checks
claude-priority validate . --skip-naming --skip-json
```
## 📊 Benchmarks
Validation time comparison (1,000 plugins):
- **Bash version**: 45 seconds
- **Rust version**: 4.2 seconds
- **Speedup**: 10.7x faster
## 🔒 Verification
Verify download integrity:
```bash
# Download checksums
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/v1.0.0/checksums.txt
# Verify (Linux/macOS)
sha256sum -c checksums.txt
# Verify (Windows)
Get-FileHash -Algorithm SHA256 claude-priority.exe
```
## 📝 Full Changelog
- Initial Rust implementation
- Naming convention validation
- JSON schema validation (marketplace.json)
- YAML frontmatter validation (skill.md)
- Colored terminal output
- Comprehensive error messages
- Exit codes for CI/CD integration
- Cross-platform support (5 architectures)
## 🐛 Known Issues
None
## 🔗 Links
- **Documentation**: https://github.com/ZenterFlow/claude-priority
- **Issues**: https://github.com/ZenterFlow/claude-priority/issues
- **Cargo Package**: https://crates.io/crates/claude-priority
- **Homebrew Formula**: https://github.com/ZenterFlow/homebrew-tap
```
## Automated Release Script
Create `scripts/release-cli-binary.sh`:
```bash
#!/usr/bin/env bash
set -euo pipefail
VERSION=${1:-}
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
echo "Example: $0 v1.0.0"
exit 1
fi
echo "🚀 Building Claude Priority CLI $VERSION"
echo
cd "$(dirname "$0")/../.distributions/10-cli-binary"
# Clean previous builds
rm -f claude-priority-*
rm -f checksums.txt
# Build for all targets
echo "📦 Building binaries..."
targets=(
"x86_64-unknown-linux-gnu:linux-x86_64"
"aarch64-unknown-linux-gnu:linux-aarch64"
"x86_64-apple-darwin:macos-x86_64"
"aarch64-apple-darwin:macos-aarch64"
"x86_64-pc-windows-msvc:windows-x86_64.exe"
)
for target_info in "${targets[@]}"; do
IFS=':' read -r target filename <<< "$target_info"
echo " Building for $target..."
cargo build --release --target "$target"
if [[ "$filename" == *.exe ]]; then
cp "target/$target/release/claude-priority.exe" "claude-priority-$filename"
else
cp "target/$target/release/claude-priority" "claude-priority-$filename"
fi
# Strip debug symbols (except Windows)
if [[ "$filename" != *.exe ]]; then
strip "claude-priority-$filename" 2>/dev/null || true
fi
done
echo
echo "✅ All binaries built"
echo
# Calculate checksums
echo "🔐 Calculating checksums..."
sha256sum claude-priority-* > checksums.txt
cat checksums.txt
echo
# Create release notes
cat > RELEASE_NOTES.md <<EOF
# Claude Priority CLI $VERSION
## 📦 Installation
Choose your platform:
**Linux (x86_64):**
\`\`\`bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-linux-x86_64
chmod +x claude-priority-linux-x86_64
sudo mv claude-priority-linux-x86_64 /usr/local/bin/claude-priority
\`\`\`
**macOS (Apple Silicon):**
\`\`\`bash
curl -LO https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-macos-aarch64
chmod +x claude-priority-macos-aarch64
sudo mv claude-priority-macos-aarch64 /usr/local/bin/claude-priority
\`\`\`
**Windows:**
\`\`\`powershell
Invoke-WebRequest -Uri "https://github.com/ZenterFlow/claude-priority/releases/download/$VERSION/claude-priority-windows-x86_64.exe" -OutFile "claude-priority.exe"
\`\`\`
## 🚀 Usage
\`\`\`bash
claude-priority validate /path/to/plugin
\`\`\`
## 🔒 Verify Download
\`\`\`bash
sha256sum -c checksums.txt
\`\`\`
For full documentation, see: https://github.com/ZenterFlow/claude-priority
EOF
# Create GitHub release
echo "📤 Creating GitHub release..."
gh release create "$VERSION" \
--title "Claude Priority CLI $VERSION" \
--notes-file RELEASE_NOTES.md \
claude-priority-linux-x86_64 \
claude-priority-linux-aarch64 \
claude-priority-macos-x86_64 \
claude-priority-macos-aarch64 \
claude-priority-windows-x86_64.exe \
checksums.txt
echo
echo "✅ Release $VERSION published!"
echo "🔗 https://github.com/ZenterFlow/claude-priority/releases/tag/$VERSION"
```
Make executable:
```bash
chmod +x scripts/release-cli-binary.sh
```
## GitHub Actions Workflow (Automated)
Create `.github/workflows/release-cli.yml`:
```yaml
name: Release CLI Binary
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: claude-priority-linux-x86_64
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
artifact: claude-priority-linux-aarch64
- os: macos-latest
target: x86_64-apple-darwin
artifact: claude-priority-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact: claude-priority-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: claude-priority-windows-x86_64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: |
cd .distributions/10-cli-binary
cargo build --release --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
cd .distributions/10-cli-binary
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp target/${{ matrix.target }}/release/claude-priority.exe ${{ matrix.artifact }}
else
cp target/${{ matrix.target }}/release/claude-priority ${{ matrix.artifact }}
strip ${{ matrix.artifact }} || true
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: .distributions/10-cli-binary/${{ matrix.artifact }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create checksums
run: |
cd artifacts
find . -type f -name 'claude-priority-*' -exec sha256sum {} \; > checksums.txt
cat checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/*/claude-priority-*
artifacts/checksums.txt
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Post-Release Tasks
After publishing release:
1. **Update Homebrew formula** with new version and SHA256
2. **Update Chocolatey package** with new version and SHA256
3. **Update Winget manifest** with new version and SHA256
4. **Update AUR PKGBUILD** with new version and SHA256
5. **Update Snap snapcraft.yaml** with new version
6. **Announce on social media** (Twitter, Reddit, Discord)
7. **Update main README** with latest version number
## Troubleshooting
### Cross-compilation fails
Install cross-compilation tools:
```bash
cargo install cross
cross build --release --target <target>
```
### Binary doesn't run on target system
Check glibc version compatibility:
```bash
ldd --version
```
Build static binary:
```bash
cargo build --release --target x86_64-unknown-linux-musl
```
### GitHub release upload fails
Check permissions:
```bash
gh auth status
gh auth refresh -s write:packages
```
## Security
### Code Signing
**macOS:**
```bash
codesign --sign "Developer ID" claude-priority-macos-aarch64
```
**Windows:**
```powershell
signtool sign /f certificate.pfx /p password claude-priority-windows-x86_64.exe
```
### Checksums
Always include SHA256 checksums for all binaries. Users can verify:
```bash
sha256sum claude-priority-linux-x86_64
# Compare with checksums.txt
```
## Next Steps
After first release:
1. Test installation on all platforms
2. Gather user feedback
3. Fix any compatibility issues
4. Plan next release with improvements
---
**Release Checklist:**
- [ ] All binaries build successfully
- [ ] Checksums generated
- [ ] Release notes written
- [ ] GitHub release created
- [ ] Binaries uploaded
- [ ] Installation tested on each platform
- [ ] Dependent distributions updated
- [ ] Announcement prepared