426e9eeabd
Benchmark Bridge Tests / benchmark (bunx @biomejs/biome check packages/lifeops-bench/src, benchmark-lint) (push) Waiting to run
Benchmark Bridge Tests / benchmark (bunx vitest run --config packages/lifeops-bench/vitest.config.ts --root packages/lifeops-bench --passWithNoTests, benchmark-tests) (push) Waiting to run
Build Agent Image / build-and-push (push) Waiting to run
Chat shell gestures / Chat shell gesture + parity e2e (push) Waiting to run
ci / test (push) Waiting to run
ci / lint-and-format (push) Waiting to run
ci / build (push) Waiting to run
ci / dev-startup (push) Waiting to run
Cloud Gateway Discord / Test (push) Waiting to run
Cloud Gateway Webhook / Test (push) Waiting to run
Cloud Tests / lint-and-types (push) Waiting to run
Cloud Tests / unit-tests (push) Waiting to run
Cloud Tests / integration-tests (push) Waiting to run
Cloud Tests / e2e-tests (push) Blocked by required conditions
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Apps Worker (Product 2) / Determine environment (push) Waiting to run
Deploy Apps Worker (Product 2) / Deploy apps worker to apps-control host (${{ needs.determine-env.outputs.environment }}) (push) Blocked by required conditions
Deploy Eliza Provisioning Worker / Determine environment (push) Waiting to run
Deploy Eliza Provisioning Worker / Deploy worker to Hetzner host (${{ needs.determine-env.outputs.environment }} @ ${{ needs.determine-env.outputs.deployment_sha }}) (push) Blocked by required conditions
Dev Smoke / Classify changed paths (push) Waiting to run
Dev Smoke / bun run dev onboarding chat (push) Blocked by required conditions
Dev Smoke / Vite HMR dependency-level smoke (push) Blocked by required conditions
Electrobun Submodule Guard / electrobun gitlink is fetchable (push) Waiting to run
gitleaks / gitleaks (push) Waiting to run
Markdown Links / Relative Markdown Links (push) Waiting to run
Publish @elizaos/example-code / check_npm (push) Waiting to run
Publish @elizaos/example-code / publish_npm (push) Blocked by required conditions
Publish @elizaos/plugin-elizacloud / verify_version (push) Waiting to run
Publish @elizaos/plugin-elizacloud / publish_npm (push) Blocked by required conditions
Quality (Extended) / Homepage Build (PR smoke) (push) Waiting to run
Quality (Extended) / Comment-only diff guard (push) Waiting to run
Quality (Extended) / Format + Type Safety Ratchet (push) Waiting to run
Quality (Extended) / Develop Gate (secret scan + UI determinism) (push) Waiting to run
Quality (Extended) / Develop Gate (lint) (push) Waiting to run
Sandbox Live Smoke / Sandbox live smoke (push) Waiting to run
Snap Build & Test / Build Snap (amd64) (push) Waiting to run
Snap Build & Test / Build Snap (arm64) (push) Waiting to run
supply-chain / sbom (push) Waiting to run
supply-chain / vulnerability-scan (push) Waiting to run
Build, Push & Deploy to Phala Cloud / build-and-push (push) Waiting to run
Test Packaging / Validate Packaging Configs (push) Waiting to run
Test Packaging / PyPI on Python ${{ matrix.python }} (push) Waiting to run
Test Packaging / Pack & Test JS Tarballs (push) Waiting to run
Test Packaging / elizaos CLI global-install smoke (node + bun) (push) Waiting to run
UI Fixture E2E / ui-fixture-e2e (push) Waiting to run
UI Fixture E2E / fixture-e2e (push) Waiting to run
UI Story Gate / story-gate (push) Waiting to run
vault-ci / test (macos-latest) (push) Waiting to run
vault-ci / test (ubuntu-latest) (push) Waiting to run
vault-ci / test (windows-latest) (push) Waiting to run
vault-ci / app-core wiring tests (push) Waiting to run
verify-patches / verify patches/CHECKSUMS.sha256 (push) Waiting to run
Voice Benchmark Smoke / voice-emotion fixture smoke (push) Waiting to run
Voice Benchmark Smoke / voiceagentbench fixture smoke (push) Waiting to run
Voice Benchmark Smoke / voicebench-quality unit smoke (push) Waiting to run
Voice Benchmark Smoke / voicebench TypeScript unit (no audio) (push) Waiting to run
Voice Benchmark Smoke / voice bench smoke summary (push) Blocked by required conditions
Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Waiting to run
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Waiting to run
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Waiting to run
Test Packaging / Build & Test PyPI Package (push) Waiting to run
Voice Workbench / headless workbench (mocked backends) (push) Has been cancelled
Voice Workbench / real acoustic lane (nightly, provisioned only) (push) Has been cancelled
620 lines
25 KiB
YAML
620 lines
25 KiB
YAML
name: ComputerUse Rust Crates Release
|
|
|
|
# Publish ComputerUse Rust crates to crates.io on release
|
|
#
|
|
# Publishing Order (respecting dependencies):
|
|
# 1. computeruse-computer-use - base crate, no internal deps
|
|
# 2. computeruse-rs - depends on computeruse-computer-use
|
|
# 3. computeruse-mcp-agent - depends on computeruse-rs
|
|
# 4. computeruse-workflow-recorder - depends on computeruse-rs
|
|
# 5. computeruse-cli - depends on computeruse-mcp-agent
|
|
# 6. computeruse-python - binding crate (independent)
|
|
# 7. computeruse-nodejs - binding crate (independent)
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
enable_removed_computeruse:
|
|
description: "Run this removed-package workflow after restoring packages/computeruse"
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
crate:
|
|
description: "Crate to release"
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- all
|
|
- computeruse-computer-use
|
|
- computeruse-rs
|
|
- computeruse-mcp-agent
|
|
- computeruse-workflow-recorder
|
|
- computeruse-cli
|
|
- computeruse-python
|
|
- computeruse-nodejs
|
|
dry_run:
|
|
description: "Dry run (do not publish)"
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
version:
|
|
description: "Version to publish (defaults to workspace version 0.24.20)"
|
|
required: false
|
|
type: string
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
CARGO_NET_RETRY: 10
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: packages/computeruse
|
|
|
|
# Default to least privilege. Override per-job where needed.
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# ============================================
|
|
# Stage 1: computeruse-computer-use (base)
|
|
# ============================================
|
|
build-computer-use:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
should_publish: ${{ steps.check.outputs.should_publish }}
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "computeruse-computer-use" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Get version
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
id: version
|
|
run: |
|
|
if [[ -n "${{ github.event.inputs.version }}" ]]; then
|
|
VERSION="${{ github.event.inputs.version }}"
|
|
elif [[ "${{ github.event_name }}" == "release" ]]; then
|
|
VERSION="${{ github.event.release.tag_name }}"
|
|
VERSION="${VERSION#computeruse-v}"
|
|
VERSION="${VERSION#v}"
|
|
else
|
|
VERSION=$(grep -m1 'version = ' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
|
|
fi
|
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
|
echo "Publishing version: ${VERSION}"
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ steps.version.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Check formatting
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run clippy
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo clippy -p computeruse-computer-use -- -D warnings || true
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p computeruse-computer-use
|
|
|
|
- name: Run tests
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo test -p computeruse-computer-use || true
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p computeruse-computer-use
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p computeruse-computer-use
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# computeruse-computer-use Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: computeruse-computer-use" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
# ============================================
|
|
# Stage 2: computeruse-rs (depends on computer-use)
|
|
# ============================================
|
|
build-computeruse-rs:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: build-computer-use
|
|
|
|
outputs:
|
|
should_publish: ${{ steps.check.outputs.should_publish }}
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "computeruse-rs" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Wait for crates.io to index computeruse-computer-use
|
|
if: steps.check.outputs.should_publish == 'true' && needs.build-computer-use.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
run: |
|
|
echo "Waiting 120 seconds for crates.io to index computeruse-computer-use..."
|
|
sleep 120
|
|
working-directory: .
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ needs.build-computer-use.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
# Update workspace dependency to use published version
|
|
sed -i "s|computeruse-computer-use = { version = \"[^\"]*\", path = \"[^\"]*\" }|computeruse-computer-use = \"${VERSION}\"|" Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p computeruse-rs
|
|
|
|
- name: Run tests
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo test -p computeruse-rs || true
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p computeruse-rs
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p computeruse-rs
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# computeruse-rs Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: computeruse-rs" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ needs.build-computer-use.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
# ============================================
|
|
# Stage 3: computeruse-mcp-agent & computeruse-workflow-recorder
|
|
# Both depend on computeruse-rs
|
|
# ============================================
|
|
build-mcp-agent:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: [build-computer-use, build-computeruse-rs]
|
|
|
|
outputs:
|
|
should_publish: ${{ steps.check.outputs.should_publish }}
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "computeruse-mcp-agent" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Wait for crates.io to index computeruse-rs
|
|
if: steps.check.outputs.should_publish == 'true' && needs.build-computeruse-rs.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
run: |
|
|
echo "Waiting 120 seconds for crates.io to index computeruse-rs..."
|
|
sleep 120
|
|
working-directory: .
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ needs.build-computer-use.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
# Update workspace dependency to use published version
|
|
sed -i "s|computeruse = { version = \"[^\"]*\", path = \"[^\"]*\"[^}]*}|computeruse = \"${VERSION}\"|" Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p computeruse-mcp-agent
|
|
|
|
- name: Run tests
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo test -p computeruse-mcp-agent || true
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p computeruse-mcp-agent
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p computeruse-mcp-agent
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# computeruse-mcp-agent Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: computeruse-mcp-agent" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ needs.build-computer-use.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
build-workflow-recorder:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: [build-computer-use, build-computeruse-rs]
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "computeruse-workflow-recorder" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Wait for crates.io to index computeruse-rs
|
|
if: steps.check.outputs.should_publish == 'true' && needs.build-computeruse-rs.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
run: |
|
|
echo "Waiting 120 seconds for crates.io to index computeruse-rs..."
|
|
sleep 120
|
|
working-directory: .
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ needs.build-computer-use.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p computeruse-workflow-recorder
|
|
|
|
- name: Run tests
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo test -p computeruse-workflow-recorder || true
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p computeruse-workflow-recorder
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p computeruse-workflow-recorder
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# computeruse-workflow-recorder Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: computeruse-workflow-recorder" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ needs.build-computer-use.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
# ============================================
|
|
# Stage 4: computeruse-cli (depends on mcp-agent)
|
|
# ============================================
|
|
build-cli:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: [build-computer-use, build-mcp-agent]
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "computeruse-cli" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Wait for crates.io to index computeruse-mcp-agent
|
|
if: steps.check.outputs.should_publish == 'true' && needs.build-mcp-agent.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
run: |
|
|
echo "Waiting 120 seconds for crates.io to index computeruse-mcp-agent..."
|
|
sleep 120
|
|
working-directory: .
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ needs.build-computer-use.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
# Update dependency to use published version
|
|
sed -i "s|computeruse-mcp-agent = { path = \"[^\"]*\" }|computeruse-mcp-agent = \"${VERSION}\"|" crates/computeruse-cli/Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p computeruse-cli
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p computeruse-cli
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p computeruse-cli
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# computeruse-cli Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: computeruse-cli" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ needs.build-computer-use.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
# ============================================
|
|
# Stage 5: Binding crates (independent)
|
|
# ============================================
|
|
build-bindings:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
needs: build-computer-use
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: computeruse-python
|
|
path: packages/computeruse-python
|
|
- name: computeruse-nodejs
|
|
path: packages/computeruse-nodejs
|
|
|
|
steps:
|
|
- name: Check if crate should be built
|
|
id: check
|
|
run: |
|
|
CRATE="${{ github.event.inputs.crate || 'all' }}"
|
|
MATRIX_NAME="${{ matrix.name }}"
|
|
if [[ "$CRATE" == "all" ]] || [[ "$CRATE" == "$MATRIX_NAME" ]]; then
|
|
echo "should_publish=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "should_publish=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
working-directory: .
|
|
|
|
- name: Checkout code
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
|
|
- name: Install Rust toolchain
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
packages/computeruse/target
|
|
key: ${{ runner.os }}-cargo-computeruse-${{ hashFiles('packages/computeruse/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-computeruse-
|
|
|
|
- name: Update workspace version
|
|
if: steps.check.outputs.should_publish == 'true' && github.event_name == 'release'
|
|
run: |
|
|
VERSION="${{ needs.build-computer-use.outputs.version }}"
|
|
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml
|
|
echo "Updated workspace version to ${VERSION}"
|
|
|
|
- name: Build release
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo build --release -p ${{ matrix.name }}
|
|
|
|
- name: Verify publishable
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: cargo publish --dry-run --allow-dirty -p ${{ matrix.name }}
|
|
|
|
- name: Publish to crates.io
|
|
if: steps.check.outputs.should_publish == 'true' && github.event.inputs.dry_run != 'true'
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
|
run: cargo publish --allow-dirty -p ${{ matrix.name }}
|
|
|
|
- name: Summary
|
|
if: steps.check.outputs.should_publish == 'true'
|
|
run: |
|
|
echo "# ${{ matrix.name }} Release" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Crate**: ${{ matrix.name }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Version**: ${{ needs.build-computer-use.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Published**: ${{ github.event.inputs.dry_run != 'true' }}" >> $GITHUB_STEP_SUMMARY
|
|
working-directory: .
|
|
|
|
# ============================================
|
|
# Summary job
|
|
# ============================================
|
|
release-summary:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-computer-use, build-computeruse-rs, build-mcp-agent, build-workflow-recorder, build-cli, build-bindings]
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.enable_removed_computeruse == true }} # packages/computeruse is no longer present in this repo.
|
|
|
|
steps:
|
|
- name: Generate release summary
|
|
run: |
|
|
echo "# ComputerUse Crates Release Summary" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "## Crates Published" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Crate | Status |" >> $GITHUB_STEP_SUMMARY
|
|
echo "|-------|--------|" >> $GITHUB_STEP_SUMMARY
|
|
echo "| computeruse-computer-use | ${{ needs.build-computer-use.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| computeruse-rs | ${{ needs.build-computeruse-rs.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| computeruse-mcp-agent | ${{ needs.build-mcp-agent.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| computeruse-workflow-recorder | ${{ needs.build-workflow-recorder.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| computeruse-cli | ${{ needs.build-cli.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "| Bindings (python, nodejs) | ${{ needs.build-bindings.result }} |" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "## Total Crates: 7" >> $GITHUB_STEP_SUMMARY
|