@@ -179,3 +179,70 @@ jobs:
179179 - Headless: `./mcpproxy --tray=false`
180180 env :
181181 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
182+
183+ update-homebrew :
184+ needs : release
185+ runs-on : ubuntu-latest
186+ if : startsWith(github.ref, 'refs/tags/v')
187+
188+ steps :
189+ - name : Checkout tap repository
190+ uses : actions/checkout@v4
191+ with :
192+ repository : smart-mcp-proxy/homebrew-mcpproxy
193+ token : ${{ secrets.HOMEBREW_TAP_TOKEN }}
194+ path : tap
195+
196+ - name : Download release info and update formula
197+ run : |
198+ VERSION=${GITHUB_REF#refs/tags/v}
199+
200+ # Download archives to calculate SHA256
201+ cd tap
202+
203+ # Download macOS AMD64
204+ wget -q "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/mcpproxy-v${VERSION}-darwin-amd64.tar.gz"
205+ AMD64_SHA=$(sha256sum "mcpproxy-v${VERSION}-darwin-amd64.tar.gz" | cut -d' ' -f1)
206+
207+ # Download macOS ARM64
208+ wget -q "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/mcpproxy-v${VERSION}-darwin-arm64.tar.gz"
209+ ARM64_SHA=$(sha256sum "mcpproxy-v${VERSION}-darwin-arm64.tar.gz" | cut -d' ' -f1)
210+
211+ # Update formula
212+ cat > Formula/mcpproxy.rb << EOF
213+ class Mcpproxy < Formula
214+ desc "Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers"
215+ homepage "https://github.com/smart-mcp-proxy/mcpproxy-go"
216+ version "${VERSION}"
217+
218+ on_macos do
219+ if Hardware::CPU.arm?
220+ url "https://github.com/smart-mcp-proxy/mcpproxy-go/releases/download/v#{version}/mcpproxy-v#{version}-darwin-arm64.tar.gz"
221+ sha256 "${ARM64_SHA}"
222+ else
223+ url "https://github.com/smart-mcp-proxy/mcpproxy-go/releases/download/v#{version}/mcpproxy-v#{version}-darwin-amd64.tar.gz"
224+ sha256 "${AMD64_SHA}"
225+ end
226+ end
227+
228+ def install
229+ bin.install "mcpproxy"
230+ end
231+
232+ test do
233+ system "#{bin}/mcpproxy", "--version"
234+ end
235+ end
236+ EOF
237+
238+ # Clean up downloaded files
239+ rm -f *.tar.gz
240+
241+ - name : Commit and push changes
242+ run : |
243+ cd tap
244+ git config user.name "github-actions[bot]"
245+ git config user.email "github-actions[bot]@users.noreply.github.com"
246+ git add Formula/mcpproxy.rb
247+ git commit -m "Update mcpproxy to ${GITHUB_REF#refs/tags/v}"
248+ git push
0 commit comments