`agent-browser-stealth upgrade` (inherited from upstream) queried registry.npmjs.org/agent-browser and ran `npm/pnpm install -g agent-browser@latest` — installing the UNRELATED upstream `agent-browser` package and clobbering the user's stealth install (reported in testing). The stealth fork ships via GitHub Releases, so `upgrade` now just re-runs install.sh into the same directory as the current binary — identical to the install path, always tracking the freshest Release. (Windows prints manual download instructions.) Also bump CI actions off the deprecated Node 20 runtime (GitHub forces Node 24 on 2026-06-16): checkout v4->v6, upload-artifact v4->v7, download-artifact v4->v8, action-gh-release v2->v3.
138 lines
5.0 KiB
YAML
138 lines
5.0 KiB
YAML
name: Release binaries
|
|
|
|
# Build per-platform binaries and attach them to the GitHub Release for the
|
|
# pushed tag. No npm, no tokens — only the built-in GITHUB_TOKEN. Consumers
|
|
# install with: curl -fsSL .../install.sh | sh
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Existing tag to (re)build binaries for, e.g. v0.27.0-fork.12'
|
|
required: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency: release-binaries-${{ github.ref }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { name: Linux x64, os: ubuntu-latest, target: x86_64-unknown-linux-gnu, asset: agent-browser-linux-x64, use_zigbuild: true, ext: '' }
|
|
- { name: Linux ARM64, os: ubuntu-latest, target: aarch64-unknown-linux-gnu, asset: agent-browser-linux-arm64, use_zigbuild: true, ext: '' }
|
|
- { name: Linux musl x64, os: ubuntu-latest, target: x86_64-unknown-linux-musl, asset: agent-browser-linux-musl-x64, use_zigbuild: true, ext: '' }
|
|
- { name: Linux musl ARM64, os: ubuntu-latest, target: aarch64-unknown-linux-musl, asset: agent-browser-linux-musl-arm64, use_zigbuild: true, ext: '' }
|
|
- { name: Windows x64, os: ubuntu-latest, target: x86_64-pc-windows-gnu, asset: agent-browser-win32-x64, use_zigbuild: false, ext: '.exe' }
|
|
- { name: macOS x64, os: macos-latest, target: x86_64-apple-darwin, asset: agent-browser-darwin-x64, use_zigbuild: false, ext: '' }
|
|
- { name: macOS ARM64, os: macos-latest, target: aarch64-apple-darwin, asset: agent-browser-darwin-arm64, use_zigbuild: false, ext: '' }
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ github.event.inputs.tag || github.ref }}
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Install cross-compilation tools (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-x86-64-linux-gnu mingw-w64
|
|
|
|
- name: Install cargo-zigbuild
|
|
if: matrix.use_zigbuild
|
|
run: |
|
|
pip3 install ziglang
|
|
cargo install cargo-zigbuild
|
|
|
|
- name: Configure Rust linkers
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
mkdir -p ~/.cargo
|
|
cat >> ~/.cargo/config.toml << 'EOF'
|
|
[target.aarch64-unknown-linux-gnu]
|
|
linker = "aarch64-linux-gnu-gcc"
|
|
|
|
[target.x86_64-pc-windows-gnu]
|
|
linker = "x86_64-w64-mingw32-gcc"
|
|
EOF
|
|
|
|
- name: Cache Rust build artifacts
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: cli
|
|
|
|
- name: Build (zigbuild)
|
|
if: matrix.use_zigbuild
|
|
run: cargo zigbuild --release --manifest-path cli/Cargo.toml --target ${{ matrix.target }}
|
|
|
|
- name: Build (cargo)
|
|
if: '!matrix.use_zigbuild'
|
|
run: cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.target }}
|
|
|
|
- name: Package (.tar.gz + .sha256)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
mkdir -p dist
|
|
src="cli/target/${{ matrix.target }}/release/agent-browser${{ matrix.ext }}"
|
|
# The binary inside every archive is named `agent-browser` (or .exe);
|
|
# install.sh extracts that fixed name regardless of platform.
|
|
cp "$src" "dist/agent-browser${{ matrix.ext }}"
|
|
chmod +x "dist/agent-browser${{ matrix.ext }}" || true
|
|
( cd dist
|
|
tar czf "${{ matrix.asset }}.tar.gz" "agent-browser${{ matrix.ext }}"
|
|
if command -v sha256sum >/dev/null 2>&1; then
|
|
sha256sum "${{ matrix.asset }}.tar.gz" > "${{ matrix.asset }}.tar.gz.sha256"
|
|
else
|
|
shasum -a 256 "${{ matrix.asset }}.tar.gz" > "${{ matrix.asset }}.tar.gz.sha256"
|
|
fi
|
|
)
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: ${{ matrix.asset }}
|
|
path: dist/${{ matrix.asset }}.tar.gz*
|
|
retention-days: 3
|
|
|
|
release:
|
|
name: Attach binaries to GitHub Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
path: dist
|
|
merge-multiple: true
|
|
|
|
- name: List assets
|
|
run: ls -la dist
|
|
|
|
- name: Attach to release
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
|
|
files: |
|
|
dist/*.tar.gz
|
|
dist/*.tar.gz.sha256
|
|
fail_on_unmatched_files: true
|
|
# keep existing release notes if the release was created beforehand
|
|
append_body: false
|