From 4b9739e329cf6eef67efbe376b9f9f4f3a63875c Mon Sep 17 00:00:00 2001 From: AmanSwar Date: Wed, 11 Mar 2026 04:36:05 +0530 Subject: [PATCH] fix: auto-update Homebrew formula SHA on release Prevents checksum mismatch (fixes #15) by having CI update Formula/rcli.rb with the exact SHA256 from the build. Also updates install instructions to use the fully-qualified brew install command. --- .github/workflows/release.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7da0f5b..1657faf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,8 +46,7 @@ jobs: ## Installation ```bash - brew tap RunanywhereAI/rcli https://github.com/RunanywhereAI/RCLI.git - brew install rcli + brew install runanywhereai/rcli/rcli rcli setup # download AI models (~1GB, one-time) ``` @@ -57,3 +56,22 @@ jobs: ``` env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Homebrew formula + run: | + VERSION="${GITHUB_REF_NAME#v}" + SHA256="${{ steps.package.outputs.sha256 }}" + TARBALL_URL="https://github.com/RunanywhereAI/RCLI/releases/download/${GITHUB_REF_NAME}/rcli-${VERSION}-Darwin-arm64.tar.gz" + + sed -i '' "s|url \".*\"|url \"${TARBALL_URL}\"|" Formula/rcli.rb + sed -i '' "s|sha256 \".*\"|sha256 \"${SHA256}\"|" Formula/rcli.rb + sed -i '' "s|version \".*\"|version \"${VERSION}\"|" Formula/rcli.rb + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout main + git add Formula/rcli.rb + git commit -m "formula: update to ${VERSION}" + git push origin main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}