mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-04-25 00:06:21 +02:00
feat: GitHub Release workflow + Homebrew tap + install badges
- .github/workflows/release.yml: builds prebuilt binaries for macOS (arm64, x86_64) and Linux (x86_64, aarch64) on tag push. Creates GitHub Release with tarballs + SHA256SUMS. Auto-updates Homebrew formula via bump-homebrew-formula-action. - README: added GitHub download count + npm install count badges. Install section now lists: Homebrew, prebuilt binaries, cargo install --git, Docker, Docker Compose. - Homebrew tap created at github.com/0xMassi/homebrew-webclaw with Formula/webclaw.rb (installs webclaw + webclaw-mcp binaries). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d521a79a66
commit
d2887cace8
2 changed files with 129 additions and 6 deletions
109
.github/workflows/release.yml
vendored
Normal file
109
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "--cfg reqwest_unstable"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-13
|
||||
- target: aarch64-apple-darwin
|
||||
os: macos-14
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: ${{ matrix.target }}
|
||||
|
||||
# Cross-compilation support for aarch64-linux
|
||||
- name: Install cross-compilation tools
|
||||
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: cargo build --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Package
|
||||
shell: bash
|
||||
run: |
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
staging="webclaw-${tag}-${{ matrix.target }}"
|
||||
mkdir "$staging"
|
||||
cp target/${{ matrix.target }}/release/webclaw "$staging/" 2>/dev/null || true
|
||||
cp target/${{ matrix.target }}/release/webclaw-mcp "$staging/" 2>/dev/null || true
|
||||
cp README.md LICENSE "$staging/"
|
||||
tar czf "$staging.tar.gz" "$staging"
|
||||
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: ${{ env.ASSET }}
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Compute checksums
|
||||
run: |
|
||||
cd artifacts
|
||||
find . -name '*.tar.gz' -exec mv {} . \;
|
||||
sha256sum *.tar.gz > SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
artifacts/*.tar.gz
|
||||
artifacts/SHA256SUMS
|
||||
|
||||
homebrew:
|
||||
name: Update Homebrew
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update Homebrew formula
|
||||
uses: mislav/bump-homebrew-formula-action@v3
|
||||
with:
|
||||
formula-name: webclaw
|
||||
homebrew-tap: 0xMassi/homebrew-webclaw
|
||||
download-url: https://github.com/0xMassi/webclaw/releases/download/${{ github.ref_name }}/webclaw-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
|
||||
env:
|
||||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue