Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

fix: wizard auto-installs Go if missing before building Crush #18

fix: wizard auto-installs Go if missing before building Crush

fix: wizard auto-installs Go if missing before building Crush #18

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-homebrew:
needs: release
runs-on: ubuntu-latest
steps:
- name: Update Homebrew formula
env:
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
VERSION: ${{ github.ref_name }}
run: |
VERSION="${VERSION#v}"
# Download checksums
curl -sL "https://github.com/AgentGuardHQ/shellforge/releases/download/v${VERSION}/checksums.txt" -o checksums.txt
DARWIN_ARM64=$(grep darwin_arm64 checksums.txt | awk '{print $1}')
DARWIN_AMD64=$(grep darwin_amd64 checksums.txt | awk '{print $1}')
LINUX_ARM64=$(grep linux_arm64 checksums.txt | awk '{print $1}')
LINUX_AMD64=$(grep linux_amd64 checksums.txt | awk '{print $1}')
cat > shellforge.rb << FORMULA
# typed: false
# frozen_string_literal: true
class Shellforge < Formula
desc "Local governed agent runtime — wraps Ollama + AgentGuard governance"
homepage "https://github.com/AgentGuardHQ/shellforge"
version "${VERSION}"
license "MIT"
on_macos do
on_arm do
url "https://github.com/AgentGuardHQ/shellforge/releases/download/v${VERSION}/shellforge_${VERSION}_darwin_arm64.tar.gz"
sha256 "${DARWIN_ARM64}"
end
on_intel do
url "https://github.com/AgentGuardHQ/shellforge/releases/download/v${VERSION}/shellforge_${VERSION}_darwin_amd64.tar.gz"
sha256 "${DARWIN_AMD64}"
end
end
on_linux do
on_arm do
url "https://github.com/AgentGuardHQ/shellforge/releases/download/v${VERSION}/shellforge_${VERSION}_linux_arm64.tar.gz"
sha256 "${LINUX_ARM64}"
end
on_intel do
url "https://github.com/AgentGuardHQ/shellforge/releases/download/v${VERSION}/shellforge_${VERSION}_linux_amd64.tar.gz"
sha256 "${LINUX_AMD64}"
end
end
def install
bin.install "shellforge"
end
test do
system "#{bin}/shellforge", "version"
end
end
FORMULA
# Push to homebrew-tap repo
git clone "https://x-access-token:${GH_TOKEN}@github.com/AgentGuardHQ/homebrew-tap.git" tap
mkdir -p tap/Formula
cp shellforge.rb tap/Formula/shellforge.rb
cd tap
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add Formula/shellforge.rb
git commit -m "Update shellforge to ${VERSION}" || echo "No changes"
git push