diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d99c8b4 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/README.md b/README.md index d4b3767..79723b6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ Website Docs License - npm + Downloads + npm installs Stars Discord

@@ -52,14 +53,27 @@ npx create-webclaw Auto-detects your AI tools, downloads the MCP server, and configures everything. One command. -### CLI +### Homebrew (macOS/Linux) ```bash -# From source -git clone https://github.com/0xMassi/webclaw && cd webclaw -cargo build --release +brew tap 0xMassi/webclaw +brew install webclaw +``` -# Or via Docker +### Prebuilt binaries + +Download from [GitHub Releases](https://github.com/0xMassi/webclaw/releases) for macOS (arm64, x86_64) and Linux (x86_64, aarch64). + +### Cargo (from source) + +```bash +cargo install --git https://github.com/0xMassi/webclaw.git webclaw-cli +cargo install --git https://github.com/0xMassi/webclaw.git webclaw-mcp +``` + +### Docker + +```bash docker run --rm ghcr.io/0xmassi/webclaw https://example.com ```