Merge pull request #577 from trycua/fix/computer-bump-agent

Ensure cua-computer bumps also update cua-agent
This commit is contained in:
Adam
2025-11-15 05:48:27 +00:00
committed by GitHub
3 changed files with 37 additions and 2 deletions

View File

@@ -30,6 +30,8 @@ permissions:
jobs:
bump-version:
runs-on: ubuntu-latest
outputs:
agent_version: ${{ steps.agent_version.outputs.version }}
steps:
- name: Set package directory
id: package
@@ -86,6 +88,37 @@ jobs:
cd ${{ steps.package.outputs.directory }}
bump2version ${{ inputs.bump_type }}
- name: Also bump cua-agent
if: ${{ inputs.service == 'cua-computer' }}
run: |
cd libs/python/agent
bump2version ${{ inputs.bump_type }}
- name: Capture bumped agent version
if: ${{ inputs.service == 'cua-agent' || inputs.service == 'cua-computer' }}
id: agent_version
run: |
cd libs/python/agent
VERSION=$(
python - <<'EOF'
import tomllib
from pathlib import Path
data = tomllib.loads(Path("pyproject.toml").read_text())
print(data["project"]["version"])
EOF
)
echo "Agent version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Push changes
run: |
git push origin main --follow-tags
publish-agent:
needs: bump-version
if: ${{ inputs.service == 'cua-agent' || inputs.service == 'cua-computer' }}
uses: ./.github/workflows/pypi-publish-agent.yml
with:
version: ${{ needs.bump-version.outputs.agent_version }}
secrets: inherit

View File

@@ -209,4 +209,4 @@ jobs:
asset_name: cua-windows-x64.exe
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -395,6 +395,7 @@ To release a new version of the CUA CLI, follow these steps:
5. Click "Run workflow"
The workflow will:
- Build single-file executables for all supported platforms
- Publish the package to npm
- Create a GitHub release with the version tag (format: `cua-vX.Y.Z`)
@@ -409,7 +410,7 @@ The workflow will:
```bash
# Test Linux/macOS installation
curl -fsSL https://cua.ai/install.sh | sh
# Test Windows installation (PowerShell)
irm https://cua.ai/install.ps1 | iex
```
@@ -417,6 +418,7 @@ The workflow will:
### 4. Update Documentation
Update any relevant documentation with the new version number, including:
- Example code in documentation
- Any version-specific instructions
- Compatibility matrices