This repository provides Homebrew Cask support for Yakit installation and automates the contribution process to the official homebrew-cask repository.
homebrew-yakit/
├── Casks/
│ ├── yakit.rb # Local development cask with advanced features
│ ├── yakit-upstream.rb # Standard cask for homebrew-cask submission
│ ├── yakit-arm64.rb # Legacy ARM64-specific cask
│ └── yakit-x64.rb # Legacy x64-specific cask
├── .github/workflows/
│ └── update-yakit.yml # Automated version updates and testing
├── latest-version.txt # Current latest version
├── history-versions.txt # Version history with dates
└── test-scripts/ # Validation and testing scripts
The GitHub Actions workflow automatically:
- Fetches latest version from GitHub Releases API
- Updates version files if newer version found
- Tests installation on macOS with real Homebrew
- Validates cask syntax using
brew audit --cask --strict - Prepares upstream PR for homebrew-cask
- Commits changes to the main branch
- Advanced features like environment variable version selection
- Local version file reading for stability
- Development and testing features
- Standard homebrew-cask format
- Simplified architecture detection using
Hardware::CPU.intel? - Compliant with homebrew-cask contribution guidelines
# Test version detection
./validate-github-integration.sh
# Test installation scenarios
./test-versions.sh
# Manual cask testing
brew audit --cask --strict Casks/yakit-upstream.rb
brew install --cask ./Casks/yakit-upstream.rb --dry-runThe macOS runner automatically:
- Validates cask syntax with strict checking
- Performs dry-run installation
- Tests actual installation and app verification
- Cleans up test installations
The workflow prepares everything for upstream contribution:
- Version Update Detected → Workflow triggers
- Local Testing → Validates on macOS
- Upstream Preparation → Creates branch in homebrew-cask format
- Manual Steps → Follow workflow output for PR creation
After successful workflow run:
- Fork homebrew-cask repository if not done already
- Add your fork as remote to the prepared branch
- Push branch to your fork
- Create PR from your fork to
Homebrew/homebrew-cask
Follow these practices for upstream PRs:
- Commit Message: Use format
yakit: update to X.X.X - Description: Include testing verification and architecture support
- Verification: Mention macOS testing and brew audit passing
- Documentation: Reference this repository for maintenance
-
Clone repository:
git clone https://github.com/yaklang/homebrew-yakit.git cd homebrew-yakit -
Configure GitHub token (for automation):
- Go to Repository Settings → Secrets → Actions
- Add
GH_TOKENwithrepoandworkflowscopes
-
Test locally:
brew tap yaklang/yakit brew install yakit
-
Update files:
echo "1.4.5-0920" > latest-version.txt echo "1.4.5-0920|$(date +%Y-%m-%d)|manual" >> history-versions.txt
-
Update cask files:
sed -i.bak 's/version "[^"]*"/version "1.4.5-0920"/' Casks/yakit-upstream.rb -
Test and commit:
brew audit --cask --strict Casks/yakit-upstream.rb git add . && git commit -m "chore: update to 1.4.5-0920"
The workflow handles everything automatically:
- Monitors GitHub releases daily at 8:00 AM UTC
- Can be manually triggered from Actions tab
- Updates all version files and cask definitions
-
Cask Validation Fails:
brew audit --cask --strict Casks/yakit-upstream.rb
-
Installation Test Fails:
brew install --cask ./Casks/yakit-upstream.rb --dry-run
-
Version Detection Issues:
curl -s "https://api.github.com/repos/yaklang/yakit/releases/latest"
- Check Actions tab for detailed logs
- Review individual step outputs
- Validate token permissions for private operations
- Ensure macOS runner has required tools
- Version detected from official sources
- All version files updated consistently
- Cask syntax validation passes
- Installation testing successful on macOS
- Upstream cask format compliance verified
- Commit messages follow conventional format
- Local testing completed
- CI passes all validation steps
- Documentation updated if needed
- Breaking changes documented
- Backward compatibility considered
- Syntax: Must pass
brew audit --cask --strict - Installation: Must install successfully on macOS
- Architecture: Support both ARM64 and Intel
- Cleanup: Proper app placement and zap trash
- Livecheck: Functional version checking
- Reliability: Handle network failures gracefully
- Testing: Comprehensive validation before changes
- Rollback: Safe failure modes without breaking state
- Monitoring: Clear logging and error reporting
- Issues: Open GitHub issue for bugs or questions
- Discussions: Use GitHub Discussions for general questions
- Security: Email security issues privately
- Upstream: Follow homebrew-cask guidelines for upstream issues
This project follows the same license as the main Yakit project (AGPL-3.0).
Happy Contributing! 🍺