| name | homebrew-release |
| description | Use when building, validating, publishing, or tap-rendering Homebrew formula tarball releases for this Swift project, including scripts/build-homebrew-release.sh, scripts/render-homebrew-formula.sh, and task build:homebrew or homebrew:formula commands. |
Homebrew Release
Use this skill for Formula releases installed with:
brew tap @ign-var:HOMEBREW_TAP=user/tap@
brew install @ign-var:HOMEBREW_CASK_TOKEN={current_dir}@
Use .agents/skills/macos-cask-release/SKILL.md for signed and notarized Cask
DMGs.
Release Contract
- Confirm
VERSION is the intended release version.
- Build and test the Swift package.
- Build macOS Homebrew tarballs with
scripts/build-homebrew-release.sh.
- Publish the tarballs to a GitHub Release only when explicitly requested.
- Render the formula only after all referenced archives and checksums exist.
- Update and verify the tap formula from the tap checkout.
The default Swift formula contract is macOS-only:
| Homebrew platform | Release asset |
|---|
| macOS Apple Silicon | @ign-var:HOMEBREW_CASK_TOKEN={current_dir}@-<version>-darwin-arm64.tar.gz |
| macOS Intel | @ign-var:HOMEBREW_CASK_TOKEN={current_dir}@-<version>-darwin-x64.tar.gz |
Do not add Linux assets unless the project has a reviewed Swift Linux runtime
contract.
Standard Commands
Build:
task build
task test
task build:homebrew -- darwin-arm64 darwin-x64
Render locally:
version="$(tr -d '[:space:]' < VERSION)"
task homebrew:formula -- "$version"
Render into the default sibling tap:
version="$(tr -d '[:space:]' < VERSION)"
task homebrew:tap-formula -- "$version"
For a custom tap path:
version="$(tr -d '[:space:]' < VERSION)"
scripts/render-homebrew-formula.sh "$version" /path/to/homebrew-tap/Formula/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@.rb
Publishing Notes
Before rendering a formula for public use, ensure the GitHub Release assets
exist:
version="$(tr -d '[:space:]' < VERSION)"
gh release view "v${version}" --repo @ign-var:GITHUB_REPOSITORY=user/repo@
If publishing is explicitly requested:
version="$(tr -d '[:space:]' < VERSION)"
gh release upload "v${version}" \
"dist/homebrew/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@-${version}-darwin-arm64.tar.gz" \
"dist/homebrew/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@-${version}-darwin-x64.tar.gz" \
--repo @ign-var:GITHUB_REPOSITORY=user/repo@ \
--clobber
Verification
From the tap checkout:
ruby -c Formula/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@.rb
brew audit --strict @ign-var:HOMEBREW_CASK_TOKEN={current_dir}@ || brew audit --strict --formula @ign-var:HOMEBREW_CASK_TOKEN={current_dir}@
brew install @ign-var:HOMEBREW_TAP=user/tap@/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@
@ign-var:EXECUTABLE_NAME={current_dir}@ --version
brew test @ign-var:HOMEBREW_TAP=user/tap@/@ign-var:HOMEBREW_CASK_TOKEN={current_dir}@
If online audit fails because of local GitHub credentials or rate limits, run a
non-online audit and report the limitation.