mirror of
https://github.com/trycua/computer.git
synced 2026-01-02 19:40:18 -06:00
Fix bump-version workflow to publish correct package
When bumping cua-computer, the workflow was incorrectly publishing cua-agent instead of cua-computer to PyPI. This was because the publish-agent job had a condition that triggered for both cua-agent and cua-computer services. Changes: - Added computer_version output to capture the bumped computer version - Changed publish-agent condition to only trigger for cua-agent service - Added new publish-computer job that triggers for cua-computer service - publish-computer job calls pypi-publish-computer.yml workflow Now when bumping cua-computer: - Bumps cua-computer version (as before) - Also bumps cua-agent version to maintain dependency sync (as before) - Publishes cua-computer to PyPI (fixed!) - Does NOT publish cua-agent to PyPI (fixed!) Fixes: https://github.com/trycua/cua/actions/runs/19512484987 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
.github/workflows/bump-version.yml
vendored
20
.github/workflows/bump-version.yml
vendored
@@ -32,6 +32,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
agent_version: ${{ steps.agent_version.outputs.version }}
|
||||
computer_version: ${{ steps.computer_version.outputs.version }}
|
||||
steps:
|
||||
- name: Set package directory
|
||||
id: package
|
||||
@@ -103,14 +104,31 @@ jobs:
|
||||
echo "Agent version: $VERSION"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Capture bumped computer version
|
||||
if: ${{ inputs.service == 'cua-computer' }}
|
||||
id: computer_version
|
||||
run: |
|
||||
cd libs/python/computer
|
||||
VERSION=$(python -c "import tomllib; from pathlib import Path; data = tomllib.loads(Path('pyproject.toml').read_text()); print(data['project']['version'])")
|
||||
echo "Computer 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' }}
|
||||
if: ${{ inputs.service == 'cua-agent' }}
|
||||
uses: ./.github/workflows/pypi-publish-agent.yml
|
||||
with:
|
||||
version: ${{ needs.bump-version.outputs.agent_version }}
|
||||
secrets: inherit
|
||||
|
||||
publish-computer:
|
||||
needs: bump-version
|
||||
if: ${{ inputs.service == 'cua-computer' }}
|
||||
uses: ./.github/workflows/pypi-publish-computer.yml
|
||||
with:
|
||||
version: ${{ needs.bump-version.outputs.computer_version }}
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user