Skip to content

Merge pull request #19 from Soumyadas15/marketing #20

Merge pull request #19 from Soumyadas15/marketing

Merge pull request #19 from Soumyadas15/marketing #20

Workflow file for this run

name: Release
on:
push:
branches: [main]
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
name: Build ${{ matrix.artifact }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
artifact: agent-computer-use-macos-arm64
ext: ''
- os: macos-latest
target: x86_64-apple-darwin
artifact: agent-computer-use-macos-x64
ext: ''
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: agent-computer-use-linux-x64
ext: ''
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: agent-computer-use-windows-x64.exe
ext: '.exe'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
cli/target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('cli/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-cargo-
- name: Build release binary
working-directory: cli
run: cargo build --release --target ${{ matrix.target }}
- name: Stage binary
shell: bash
run: |
mkdir -p staged
cp "cli/target/${{ matrix.target }}/release/agent-cu${{ matrix.ext }}" "staged/${{ matrix.artifact }}"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: staged/${{ matrix.artifact }}
if-no-files-found: error
retention-days: 7
release:
name: Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- name: Download all platform binaries
uses: actions/download-artifact@v4
with:
path: bin
merge-multiple: true
- name: Make binaries executable
run: |
chmod +x bin/agent-computer-use-macos-arm64 || true
chmod +x bin/agent-computer-use-macos-x64 || true
chmod +x bin/agent-computer-use-linux-x64 || true
ls -lh bin/
- name: Verify bundle is ready
run: pnpm bundle
- name: Create Release PR or Publish to npm
uses: changesets/action@v1
with:
publish: pnpm exec changeset publish
title: 'chore: version packages'
commit: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: 'true'