diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6c19bc..a4d9464 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,11 @@ jobs: curl -sSL https://runcrate.ai/install.sh | sh ``` + **Homebrew (macOS / Linux):** + ```bash + brew install aeonmindai/tap/runcrate + ``` + **Windows (PowerShell):** ```powershell irm https://runcrate.ai/install.ps1 | iex @@ -72,5 +77,26 @@ jobs: **Already installed?** ```bash - runcrate update + runcrate update # curl / PowerShell installs + brew upgrade runcrate # Homebrew installs ``` + + # Tell aeonmindai/homebrew-tap to regenerate Formula/runcrate.rb from this release's + # checksums. Needs a HOMEBREW_TAP_TOKEN secret that can dispatch to that repo; without + # it the step is skipped and the tap's six-hourly sync picks the release up instead. + - name: Update Homebrew tap + # The release is already published; a bad token or API hiccup must not turn it red. + continue-on-error: true + env: + TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + TAG: ${{ steps.version.outputs.version }} + run: | + if [ -z "$TAP_TOKEN" ]; then + echo "HOMEBREW_TAP_TOKEN not set; the tap's scheduled sync will pick up ${TAG}." + exit 0 + fi + curl -fsS --retry 3 -X POST \ + -H "Authorization: Bearer ${TAP_TOKEN}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/aeonmindai/homebrew-tap/dispatches \ + -d "{\"event_type\":\"cli-release\",\"client_payload\":{\"tag\":\"${TAG}\"}}" diff --git a/README.md b/README.md index 28fb2a3..e4a74d7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ manage workspaces, storage, templates, and billing from your terminal. curl -sSL https://runcrate.ai/install.sh | sh ``` +**Homebrew (macOS / Linux):** + +```bash +brew install aeonmindai/tap/runcrate +``` + **Windows (PowerShell):** ```powershell @@ -55,7 +61,10 @@ make build-all # cross-compile all platforms into ./bin Releases are tag-driven. Pushing a `vX.Y.Z` tag runs `.github/workflows/release.yml`, which tests, cross-compiles the five targets, generates `checksums.txt`, and publishes a GitHub Release. The public installer scripts and `runcrate update` -read these releases, so no separate publish step is needed. +read these releases, so no separate publish step is needed. The same workflow asks +[aeonmindai/homebrew-tap](https://github.com/aeonmindai/homebrew-tap) to regenerate its +formula from the new checksums (needs the `HOMEBREW_TAP_TOKEN` secret; without it the +tap's own six-hourly sync picks the release up). ```bash git tag v0.1.0