call agent publish workflow after bump

This commit is contained in:
Adam
2025-11-14 16:41:55 -05:00
parent ebf3dc38d5
commit b7a655f192

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
@@ -92,6 +94,31 @@ jobs:
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