Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Publish both cua-agent and cua-computer when bumping cua-computer

f-trycua17d7140000b2
diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml
index c7104bd9c6..707bd3e5ef 100644
--- a/.github/workflows/bump-version.yml
+++ b/.github/workflows/bump-version.yml
@@ -119,7 +119,7 @@ jobs:
publish-agent:
needs: bump-version
- if: ${{ inputs.service == 'cua-agent' }}
+ if: ${{ inputs.service == 'cua-agent' || inputs.service == 'cua-computer' }}
uses: ./.github/workflows/pypi-publish-agent.yml
with:
version: ${{ needs.bump-version.outputs.agent_version }}
diff --git a/.github/workflows/pypi-publish-computer.yml b/.github/workflows/pypi-publish-computer.yml
index ea5d644bb7..c2dd402974 100644
--- a/.github/workflows/pypi-publish-computer.yml
+++ b/.github/workflows/pypi-publish-computer.yml
@@ -33,21 +33,39 @@ jobs:
- name: Determine version
id: get-version
run: |
- if [ "${{ github.event_name }}" == "push" ]; then
+ echo "=== Version Detection Debug ==="
+ echo "Event name: ${{ github.event_name }}"
+ echo "Workflow call version: ${{ inputs.version }}"
+ echo "Workflow dispatch version: ${{ github.event.inputs.version }}"
+ echo "GitHub ref: ${{ github.ref }}"
+
+ # Check inputs.version first (works for workflow_call regardless of event_name)
+ if [ -n "${{ inputs.version }}" ]; then
+ # Version provided via workflow_call or workflow_dispatch with version input
+ VERSION=${{ inputs.version }}
+ echo "Using inputs.version: $VERSION"
+ elif [ "${{ github.event_name }}" == "push" ]; then
# Extract version from tag (for package-specific tags)
if [[ "${{ github.ref }}" =~ ^refs/tags/computer-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
VERSION=${BASH_REMATCH[1]}
+ echo "Extracted from tag: $VERSION"
else
echo "Invalid tag format for computer"
exit 1
fi
- elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
- # Use version from workflow dispatch
+ elif [ -n "${{ github.event.inputs.version }}" ]; then
+ # Use version from workflow_dispatch event inputs
VERSION=${{ github.event.inputs.version }}
+ echo "Using event.inputs.version: $VERSION"
else
- # Use version from workflow_call
- VERSION=${{ inputs.version }}
+ echo "ERROR: No version found!"
+ echo " - inputs.version is empty"
+ echo " - event.inputs.version is empty"
+ echo " - Not a tag push event"
+ exit 1
fi
+
+ echo "=== Final Version ==="
echo "VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT