mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
call agent publish workflow after bump
This commit is contained in:
27
.github/workflows/bump-version.yml
vendored
27
.github/workflows/bump-version.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user