Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
feat: auto-release on PR merge with required release labels (#1055)
Francesco Bonacci76dcbfbd07d3
diff --git a/.github/workflows/ci-release-reminder.yml b/.github/workflows/ci-release-reminder.ymlnew file mode 100644index 0000000000..d0d6c49821--- /dev/null+++ b/.github/workflows/ci-release-reminder.yml@@ -0,0 +1,120 @@+name: "CI: Release Reminder"++on:+ pull_request:+ types: [opened, synchronize, labeled, unlabeled]++jobs:+ release-reminder:+ runs-on: ubuntu-latest+ permissions:+ pull-requests: write+ steps:+ - name: Check for publishable changes and remind+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ PR_NUMBER="${{ github.event.pull_request.number }}"+ REPO="${{ github.repository }}"++ # Get changed files in this PR+ CHANGED_FILES=$(gh pr diff "$PR_NUMBER" --repo "$REPO" --name-only 2>/dev/null || true)++ if [ -z "$CHANGED_FILES" ]; then+ exit 0+ fi++ # Map paths to publishable services+ declare -A PATH_TO_SERVICE=(+ ["libs/python/cua-cli/"]="pypi/cli"+ ["libs/python/agent/"]="pypi/agent"+ ["libs/python/computer/"]="pypi/computer"+ ["libs/python/core/"]="pypi/core"+ ["libs/python/som/"]="pypi/som"+ ["libs/python/bench-ui/"]="pypi/bench-ui"+ ["libs/cua-bench/"]="pypi/bench"+ ["libs/python/computer-server/"]="pypi/computer-server"+ ["libs/python/mcp-server/"]="pypi/mcp-server"+ ["libs/typescript/cua-cli/"]="npm/cli"+ ["libs/typescript/computer/"]="npm/computer"+ ["libs/typescript/core/"]="npm/core"+ ["libs/typescript/playground/"]="npm/playground"+ ["libs/cuabot/"]="npm/cuabot"+ ["libs/xfce/"]="docker/xfce"+ ["libs/kasm/"]="docker/kasm"+ ["libs/lumier/"]="docker/lumier"+ ["libs/qemu-docker/android/"]="docker/qemu-android"+ ["libs/qemu-docker/linux/"]="docker/qemu-linux"+ ["libs/qemu-docker/windows/"]="docker/qemu-windows"+ ["libs/lume/"]="lume"+ )++ # Find affected services+ AFFECTED=()+ for path_prefix in "${!PATH_TO_SERVICE[@]}"; do+ if echo "$CHANGED_FILES" | grep -q "^${path_prefix}"; then+ AFFECTED+=("${PATH_TO_SERVICE[$path_prefix]}")+ fi+ done++ # Deduplicate and sort+ IFS=$'\n' AFFECTED=($(printf '%s\n' "${AFFECTED[@]}" | sort -u)); unset IFS++ if [ ${#AFFECTED[@]} -eq 0 ]; then+ echo "No publishable packages affected."+ exit 0+ fi++ # Check which ones already have release labels+ LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}'+ HAS_NO_RELEASE=false+ if echo "$LABELS" | grep -q '"no-release"'; then+ HAS_NO_RELEASE=true+ fi++ LABELED=()+ UNLABELED=()+ for svc in "${AFFECTED[@]}"; do+ if echo "$LABELS" | grep -q "\"release:${svc}\""; then+ LABELED+=("$svc")+ else+ UNLABELED+=("$svc")+ fi+ done++ # Build comment body+ COMMENT_MARKER="<!-- release-reminder -->"+ BODY="${COMMENT_MARKER}\n"+ BODY+="### π¦ Publishable packages changed\n\n"++ if [ ${#LABELED[@]} -gt 0 ]; then+ for svc in "${LABELED[@]}"; do+ BODY+="- [x] \`${svc}\` β will auto-release on merge\n"+ done+ fi++ if [ ${#UNLABELED[@]} -gt 0 ]; then+ for svc in "${UNLABELED[@]}"; do+ if [ "$HAS_NO_RELEASE" = "true" ]; then+ BODY+="- [x] ~\`${svc}\`~ β skipped (no-release)\n"+ else+ BODY+="- [ ] \`${svc}\`\n"+ fi+ done+ fi++ if [ "$HAS_NO_RELEASE" = "false" ] && [ ${#UNLABELED[@]} -gt 0 ]; then+ BODY+="\nAdd \`release:<service>\` labels to auto-release on merge"+ BODY+=" (+ optional \`bump:minor\` or \`bump:major\`, default is patch)."+ BODY+="\nOr add \`no-release\` to skip."+ fi++ # Delete previous reminder comment if exists, then post new one+ EXISTING_COMMENT_ID=$(gh api "repos/${REPO}/issues/${PR_NUMBER}/comments" \+ --jq ".[] | select(.body | contains(\"${COMMENT_MARKER}\")) | .id" 2>/dev/null | head -1)++ if [ -n "$EXISTING_COMMENT_ID" ]; then+ gh api -X DELETE "repos/${REPO}/issues/${PR_NUMBER}/comments/${EXISTING_COMMENT_ID}" 2>/dev/null || true+ fi++ echo -e "$BODY" | gh pr comment "$PR_NUMBER" --repo "$REPO" --body-file -diff --git a/.github/workflows/release-on-merge.yml b/.github/workflows/release-on-merge.ymlnew file mode 100644index 0000000000..ed0a0a0d1b--- /dev/null+++ b/.github/workflows/release-on-merge.yml@@ -0,0 +1,145 @@+name: "CD: Auto Release on Merge"++on:+ pull_request:+ types: [closed]++jobs:+ auto-release:+ if: github.event.pull_request.merged == true+ runs-on: ubuntu-latest+ steps:+ - name: Detect packages, release labeled, notify unlabeled+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ PR_NUMBER="${{ github.event.pull_request.number }}"+ PR_TITLE="${{ github.event.pull_request.title }}"+ PR_URL="${{ github.event.pull_request.html_url }}"+ REPO="${{ github.repository }}"++ # Get labels+ LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}'++ # Skip everything if no-release+ if echo "$LABELS" | grep -q '"no-release"'; then+ echo "no-release label found, skipping."+ exit 0+ fi++ # Determine bump type from labels (default: patch)+ BUMP_TYPE="patch"+ if echo "$LABELS" | grep -q '"bump:major"'; then+ BUMP_TYPE="major"+ elif echo "$LABELS" | grep -q '"bump:minor"'; then+ BUMP_TYPE="minor"+ fi+ echo "Bump type: $BUMP_TYPE"++ # Get changed files+ CHANGED_FILES=$(gh pr diff "$PR_NUMBER" --repo "$REPO" --name-only 2>/dev/null || true)++ if [ -z "$CHANGED_FILES" ]; then+ echo "No changed files, skipping."+ exit 0+ fi++ # Map paths to publishable services+ declare -A PATH_TO_SERVICE=(+ ["libs/python/cua-cli/"]="pypi/cli"+ ["libs/python/agent/"]="pypi/agent"+ ["libs/python/computer/"]="pypi/computer"+ ["libs/python/core/"]="pypi/core"+ ["libs/python/som/"]="pypi/som"+ ["libs/python/bench-ui/"]="pypi/bench-ui"+ ["libs/cua-bench/"]="pypi/bench"+ ["libs/python/computer-server/"]="pypi/computer-server"+ ["libs/python/mcp-server/"]="pypi/mcp-server"+ ["libs/typescript/cua-cli/"]="npm/cli"+ ["libs/typescript/computer/"]="npm/computer"+ ["libs/typescript/core/"]="npm/core"+ ["libs/typescript/playground/"]="npm/playground"+ ["libs/cuabot/"]="npm/cuabot"+ ["libs/xfce/"]="docker/xfce"+ ["libs/kasm/"]="docker/kasm"+ ["libs/lumier/"]="docker/lumier"+ ["libs/qemu-docker/android/"]="docker/qemu-android"+ ["libs/qemu-docker/linux/"]="docker/qemu-linux"+ ["libs/qemu-docker/windows/"]="docker/qemu-windows"+ ["libs/lume/"]="lume"+ )++ # Find all affected services from changed files+ declare -A AFFECTED_MAP+ for path_prefix in "${!PATH_TO_SERVICE[@]}"; do+ if echo "$CHANGED_FILES" | grep -q "^${path_prefix}"; then+ service="${PATH_TO_SERVICE[$path_prefix]}"+ AFFECTED_MAP["$service"]=1+ fi+ done++ if [ ${#AFFECTED_MAP[@]} -eq 0 ]; then+ echo "No publishable packages affected, skipping."+ exit 0+ fi++ echo "Affected packages:"+ for svc in "${!AFFECTED_MAP[@]}"; do echo " - $svc"; done++ # Collect labeled packages for auto-release+ LABELED=()+ for svc in "${!AFFECTED_MAP[@]}"; do+ if echo "$LABELS" | grep -q "\"release:${svc}\""; then+ LABELED+=("$svc")+ fi+ done++ if [ ${#LABELED[@]} -eq 0 ]; then+ echo "No release labels found. Daily digest will catch unreleased packages."+ exit 0+ fi++ echo ""+ echo "Packages with release labels (will auto-release):"+ for svc in "${LABELED[@]}"; do echo " - $svc"; done++ # Cascade dedup+ declare -A RELEASE_MAP+ for svc in "${LABELED[@]}"; do RELEASE_MAP["$svc"]=1; done++ # pypi/core cascades to pypi/computer and pypi/agent+ if [[ -n "${RELEASE_MAP["pypi/core"]}" ]]; then+ unset RELEASE_MAP["pypi/computer"]+ unset RELEASE_MAP["pypi/agent"]+ fi+ # pypi/computer cascades to pypi/agent+ if [[ -n "${RELEASE_MAP["pypi/computer"]}" ]]; then+ unset RELEASE_MAP["pypi/agent"]+ fi+ # pypi/som cascades to pypi/agent+ if [[ -n "${RELEASE_MAP["pypi/som"]}" ]]; then+ unset RELEASE_MAP["pypi/agent"]+ fi+ # npm/core cascades to npm/computer+ if [[ -n "${RELEASE_MAP["npm/core"]}" ]]; then+ unset RELEASE_MAP["npm/computer"]+ fi++ echo ""+ echo "Triggering releases (after cascade dedup):"+ for svc in "${!RELEASE_MAP[@]}"; do echo " - $svc"; done++ for svc in "${!RELEASE_MAP[@]}"; do+ echo ""+ echo "Triggering release-bump-version: service=$svc bump_type=$BUMP_TYPE"+ gh workflow run release-bump-version.yml \+ --repo "$REPO" \+ -f service="$svc" \+ -f bump_type="$BUMP_TYPE"+ echo "Triggered successfully."+ sleep 15+ done+ fi++ echo ""+ echo "Done!"diff --git a/.github/workflows/release-unreleased-digest.yml b/.github/workflows/release-unreleased-digest.ymlnew file mode 100644index 0000000000..c4582900d2--- /dev/null+++ b/.github/workflows/release-unreleased-digest.yml@@ -0,0 +1,103 @@+name: "CD: Unreleased Changes Digest"++on:+ schedule:+ # Daily at 8pm PT / 4am UTC (Mon-Fri PT = Tue-Sat UTC)+ - cron: "0 4 * * 2-6"+ workflow_dispatch: {}++jobs:+ digest:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v4+ with:+ fetch-depth: 0+ fetch-tags: true++ - name: Check for unreleased changes per package+ run: |+ # Service β tag prefix β directory+ declare -A SERVICE_TAG_DIR+ SERVICE_TAG_DIR["pypi/cli"]="cli-v|libs/python/cua-cli/"+ SERVICE_TAG_DIR["pypi/agent"]="agent-v|libs/python/agent/"+ SERVICE_TAG_DIR["pypi/computer"]="computer-v|libs/python/computer/"+ SERVICE_TAG_DIR["pypi/core"]="core-v|libs/python/core/"+ SERVICE_TAG_DIR["pypi/som"]="som-v|libs/python/som/"+ SERVICE_TAG_DIR["pypi/bench"]="bench-v|libs/cua-bench/"+ SERVICE_TAG_DIR["pypi/bench-ui"]="bench-ui-v|libs/python/bench-ui/"+ SERVICE_TAG_DIR["pypi/computer-server"]="computer-server-v|libs/python/computer-server/"+ SERVICE_TAG_DIR["pypi/mcp-server"]="mcp-server-v|libs/python/mcp-server/"+ SERVICE_TAG_DIR["npm/cli"]="npm-cli-v|libs/typescript/cua-cli/"+ SERVICE_TAG_DIR["npm/computer"]="npm-computer-v|libs/typescript/computer/"+ SERVICE_TAG_DIR["npm/core"]="npm-core-v|libs/typescript/core/"+ SERVICE_TAG_DIR["npm/playground"]="npm-playground-v|libs/typescript/playground/"+ SERVICE_TAG_DIR["npm/cuabot"]="cuabot-v|libs/cuabot/"+ SERVICE_TAG_DIR["docker/xfce"]="docker-xfce-v|libs/xfce/"+ SERVICE_TAG_DIR["docker/kasm"]="docker-kasm-v|libs/kasm/"+ SERVICE_TAG_DIR["docker/lumier"]="docker-lumier-v|libs/lumier/"+ SERVICE_TAG_DIR["docker/qemu-android"]="docker-cua-qemu-android-v|libs/qemu-docker/android/"+ SERVICE_TAG_DIR["docker/qemu-linux"]="docker-cua-qemu-linux-v|libs/qemu-docker/linux/"+ SERVICE_TAG_DIR["docker/qemu-windows"]="docker-cua-qemu-windows-v|libs/qemu-docker/windows/"+ SERVICE_TAG_DIR["lume"]="lume-v|libs/lume/"++ UNRELEASED=""+ UNRELEASED_COUNT=0++ for service in $(printf '%s\n' "${!SERVICE_TAG_DIR[@]}" | sort); do+ IFS='|' read -r tag_prefix directory <<< "${SERVICE_TAG_DIR[$service]}"++ # Find the latest tag for this service+ LATEST_TAG=$(git tag -l "${tag_prefix}*" --sort=-v:refname | head -1)++ if [ -z "$LATEST_TAG" ]; then+ # No tags at all β check if directory has any commits+ COMMIT_COUNT=$(git log --oneline -- "$directory" | wc -l | xargs)+ if [ "$COMMIT_COUNT" -gt 0 ]; then+ UNRELEASED="${UNRELEASED}${service} (never released, ${COMMIT_COUNT} commits)\n"+ UNRELEASED_COUNT=$((UNRELEASED_COUNT + 1))+ fi+ continue+ fi++ # Count commits in this directory since the latest tag+ COMMIT_COUNT=$(git log --oneline "${LATEST_TAG}..HEAD" -- "$directory" | wc -l | xargs)++ if [ "$COMMIT_COUNT" -gt 0 ]; then+ UNRELEASED="${UNRELEASED}${service} (${COMMIT_COUNT} commits since ${LATEST_TAG})\n"+ UNRELEASED_COUNT=$((UNRELEASED_COUNT + 1))+ fi+ done++ if [ "$UNRELEASED_COUNT" -eq 0 ]; then+ echo "All packages are up to date!"+ exit 0+ fi++ echo "Packages with unreleased changes:"+ echo -e "$UNRELEASED"++ # Build description for AlertManager+ DESCRIPTION=$(echo -e "$UNRELEASED" | sed 's/$/; /' | tr -d '\n' | sed 's/; $//')++ # Send alert to AlertManager β Slack+ curl -s -X POST https://am.cua.ai/api/v2/alerts \+ -H "Content-Type: application/json" \+ -d "[+ {+ \"labels\": {+ \"alertname\": \"UnreleasedChangesDigest\",+ \"severity\": \"info\",+ \"source\": \"github-actions\"+ },+ \"annotations\": {+ \"summary\": \"${UNRELEASED_COUNT} packages have unreleased changes on main\",+ \"description\": \"${DESCRIPTION}\"+ },+ \"generatorURL\": \"https://github.com/${{ github.repository }}/actions/workflows/release-bump-version.yml\"+ }+ ]"++ echo ""+ echo "Slack digest sent."