This guide provides step-by-step instructions to set up automatic releases for OpenMorph with Homebrew and Scoop package managers.
Your OpenMorph project now includes:
- Version Management: Using
.versionfile with automated scripts - GoReleaser Integration: For building cross-platform binaries
- Package Manager Support: Homebrew (macOS/Linux) and Scoop (Windows)
- GitHub Actions: Automated release workflow
- Validation Tools: Scripts to verify setup integrity
Before proceeding, ensure you have:
- Go 1.24+ installed
- Git configured with your GitHub credentials
- GitHub CLI (
gh) installed and authenticated - Make utility available
- Write access to your GitHub repository
First, run the validation script to ensure everything is properly configured:
# Using make (recommended)
make validate
# Or directly
./scripts/validate-setup.shThis will check:
- Prerequisites (Go, Git, Make)
- Project files and configuration
- Version management system
- Build process
- GoReleaser configuration
- GitHub Actions setup
Run the setup script to create the required repositories:
# Using make
make setup-packages
# Or directly
./scripts/setup-package-managers.shThis will:
- Create
homebrew-openmorphrepository - Create
scoop-openmorphrepository - Set up proper directory structure and README files
- Configure repository permissions
Note: You need GitHub CLI authentication for this step.
# Bump patch version and create release
make version-release
# This will:
# 1. Bump version from 0.1.0 to 0.1.1
# 2. Commit the version change
# 3. Push to GitHub
# 4. Create and push tag v0.1.1
# 5. Trigger GitHub Actions workflow# Set specific version
make version-set
# Enter: 1.0.0
# Create release
make version-tagAfter pushing a tag, monitor the process:
- GitHub Actions: Check workflow at
https://github.com/developerkunal/OpenMorph/actions - Release Creation: Verify release created at
https://github.com/developerkunal/OpenMorph/releases - Package Updates: Check that package manager repositories were updated:
- Homebrew:
https://github.com/developerkunal/homebrew-openmorph - Scoop:
https://github.com/developerkunal/scoop-openmorph
- Homebrew:
Once the release is complete, test installation:
# Add tap
brew tap developerkunal/openmorph
# Install
brew install openmorph
# Test
openmorph --version# Add bucket
scoop bucket add openmorph https://github.com/developerkunal/scoop-openmorph
# Install
scoop install openmorph
# Test
openmorph --version# Show current version
make version-show
# Bump versions
make version-bump-patch # 0.1.0 → 0.1.1
make version-bump-minor # 0.1.0 → 0.2.0
make version-bump-major # 0.1.0 → 1.0.0
# Set specific version
make version-set
# Create and push tag
make version-tag
# Full release (bump patch + commit + tag + push)
make version-release
# Validate setup
make validate
# Setup package managers
make setup-packages# Direct script usage
./scripts/version.sh show
./scripts/version.sh bump patch
./scripts/version.sh set 2.1.0
./scripts/version.sh tag
./scripts/version.sh release.version: Contains current semantic version (e.g.,0.1.0).goreleaser.yml: GoReleaser configuration for builds and package managers.github/workflows/release.yml: GitHub Actions workflow for releasesMakefile: Build and version management commands
- Homebrew:
developerkunal/homebrew-openmorph - Scoop:
developerkunal/scoop-openmorph
# Homebrew (macOS/Linux)
brew tap developerkunal/openmorph
brew install openmorph
# Scoop (Windows)
scoop bucket add openmorph https://github.com/developerkunal/scoop-openmorph
scoop install openmorph# Make code changes
git add .
git commit -m "Add new feature"
git push
# Version is automatically picked up from .version file
make build
./openmorph --version # Shows current version# Option 1: Automatic patch release
make version-release
# Option 2: Custom version
make version-set # Enter new version
make version-tag # Create and push tag
# Option 3: Manual bump
make version-bump-minor # or major/patch
git add .version
git commit -m "Bump version to $(cat .version)"
git push
make version-tag# Test build without releasing
make snapshot
# This creates local builds in dist/ without publishing# Check configuration
goreleaser check
# Test local build
make snapshot# Ensure script is executable
chmod +x scripts/version.sh
# Check version file format
cat .version
# Should contain only: X.Y.Z (e.g., 1.2.3)- Check
GITHUB_TOKENpermissions in repository settings - Verify repository names in
.goreleaser.ymlexist - Ensure package manager repositories were created
- Verify repositories exist and are public
- Check that releases completed successfully
- Ensure package manager files were generated in release
Always run validation before releases:
make validate- Detailed Version Management: See
VERSION_MANAGEMENT.md - GoReleaser Documentation: https://goreleaser.com/
- GitHub Actions Documentation: https://docs.github.com/en/actions
After setup, you should be able to:
- Run
make validatesuccessfully - Build project with
make build - Show version with
./openmorph --version - Create snapshot with
make snapshot - Bump version with
make version-bump-patch - Create release with
make version-release - Install via Homebrew:
brew install openmorph - Install via Scoop:
scoop install openmorph
🎉 Congratulations! Your OpenMorph project now has a complete auto-release setup with package manager support!