Skip to content
Draft
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2e01164
Add design document for consolidating bump-version and publish workflows
Oct 24, 2025
9a16f5b
feat: add version extraction to bump-version workflow
Oct 24, 2025
a7dc31c
feat: add package metadata mapping
Oct 24, 2025
dd45bb2
feat: add tag creation and push after version bump
Oct 24, 2025
9cc34e5
feat: add publish job to bump-version workflow
Oct 24, 2025
96cbf88
fix: correct syntax for calling reusable workflow
Oct 24, 2025
2a0afb8
refactor: remove individual publish workflows
Oct 24, 2025
0f59906
docs: update workflow documentation
Oct 24, 2025
6f83fa7
fix: handle dynamic versioning for pylume package
Oct 24, 2025
8cb4746
what were these set-env-variables: doing and is it preserved on thi…
Oct 27, 2025
437055f
Merge pull request #2 from r33drichards/vk/f552-what-were-these
r33drichards Oct 27, 2025
42df999
Perfect! Let me create a summary of what was created:
Oct 27, 2025
577f11a
refactor: use Python script for release notes generation
Oct 27, 2025
23fa06f
fix: update test workflow to run on all branches and fix typo
Oct 27, 2025
eb50ffa
Merge branch 'origin/feature/consolidate-publish-workflows' into vk/1…
Oct 27, 2025
5fa9d50
Merge pull request #3 from r33drichards/vk/1e7e-rewrite-this-to
r33drichards Oct 27, 2025
6f84feb
Delete .github/scripts/example_workflow_usage.yml
r33drichards Oct 27, 2025
73839fe
chore: add code style hooks and format Python files
Oct 28, 2025
f1f97a7
chore: fix prettier formatting issues and add package-lock.json
Oct 28, 2025
8d99253
Delete package-lock.json
r33drichards Oct 29, 2025
eceafd2
rvrt
r33drichards Oct 29, 2025
0b0d496
f
r33drichards Oct 29, 2025
750756f
Revert "f"
r33drichards Oct 29, 2025
281512d
Revert "rvrt"
r33drichards Oct 29, 2025
0db3679
match og repo
r33drichards Oct 29, 2025
67b9267
Merge branch 'main' into feature/consolidate-publish-workflows
r33drichards Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ permissions:
jobs:
bump-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.extract-version.outputs.version }}
package_directory: ${{ steps.package.outputs.directory }}
service: ${{ inputs.service }}
package_name: ${{ steps.package-metadata.outputs.package_name }}
base_package_name: ${{ steps.package-metadata.outputs.base_package_name }}
is_lume_package: ${{ steps.package-metadata.outputs.is_lume_package }}
tag_prefix: ${{ steps.package-metadata.outputs.tag_prefix }}
steps:
- name: Set package directory
id: package
Expand Down Expand Up @@ -86,6 +94,119 @@ jobs:
cd ${{ steps.package.outputs.directory }}
bump2version ${{ inputs.bump_type }}

- name: Extract version from pyproject.toml
id: extract-version
run: |
cd ${{ steps.package.outputs.directory }}
VERSION=$(python3 << 'EOF'
import tomllib
import re
from pathlib import Path

# Read pyproject.toml
with open("pyproject.toml", "rb") as f:
config = tomllib.load(f)

# Try static version first
version = config.get("project", {}).get("version")

# If dynamic, read from source file
if not version and "version" in config.get("project", {}).get("dynamic", []):
pdm_version = config.get("tool", {}).get("pdm", {}).get("version", {})
if pdm_version.get("source") == "file":
version_file = pdm_version.get("path")
if version_file:
content = Path(version_file).read_text()
match = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
if match:
version = match.group(1)

if not version:
raise ValueError("Could not extract version from pyproject.toml")

print(version)
EOF
)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

- name: Set package metadata
id: package-metadata
run: |
SERVICE="${{ inputs.service }}"

# Map service to package metadata
case "$SERVICE" in
"cua-agent")
echo "package_name=agent" >> $GITHUB_OUTPUT
echo "base_package_name=cua-agent" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=agent-v" >> $GITHUB_OUTPUT
;;
"cua-computer")
echo "package_name=computer" >> $GITHUB_OUTPUT
echo "base_package_name=cua-computer" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=computer-v" >> $GITHUB_OUTPUT
;;
"cua-computer-server")
echo "package_name=computer-server" >> $GITHUB_OUTPUT
echo "base_package_name=cua-computer-server" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=computer-server-v" >> $GITHUB_OUTPUT
;;
"cua-core")
echo "package_name=core" >> $GITHUB_OUTPUT
echo "base_package_name=cua-core" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=core-v" >> $GITHUB_OUTPUT
;;
"cua-mcp-server")
echo "package_name=mcp-server" >> $GITHUB_OUTPUT
echo "base_package_name=cua-mcp-server" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=mcp-server-v" >> $GITHUB_OUTPUT
;;
"cua-som")
echo "package_name=som" >> $GITHUB_OUTPUT
echo "base_package_name=cua-som" >> $GITHUB_OUTPUT
echo "is_lume_package=false" >> $GITHUB_OUTPUT
echo "tag_prefix=som-v" >> $GITHUB_OUTPUT
;;
"pylume")
echo "package_name=pylume" >> $GITHUB_OUTPUT
echo "base_package_name=pylume" >> $GITHUB_OUTPUT
echo "is_lume_package=true" >> $GITHUB_OUTPUT
echo "tag_prefix=pylume-v" >> $GITHUB_OUTPUT
;;
*)
echo "Unknown service: $SERVICE"
exit 1
;;
esac

echo "Package metadata set for $SERVICE"

- name: Create and push tag
run: |
TAG="${{ steps.package-metadata.outputs.tag_prefix }}${{ steps.extract-version.outputs.version }}"
echo "Creating tag: $TAG"
git tag "$TAG"
git push origin "$TAG"
echo "Tag $TAG created and pushed"

- name: Push changes
run: |
git push origin main --follow-tags

publish:
needs: bump-version
uses: ./.github/workflows/pypi-reusable-publish.yml
with:
package_name: ${{ needs.bump-version.outputs.package_name }}
package_dir: ${{ needs.bump-version.outputs.package_directory }}
version: ${{ needs.bump-version.outputs.version }}
is_lume_package: ${{ needs.bump-version.outputs.is_lume_package == 'true' }}
base_package_name: ${{ needs.bump-version.outputs.base_package_name }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
162 changes: 0 additions & 162 deletions .github/workflows/pypi-publish-agent.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/pypi-publish-computer-server.yml

This file was deleted.

Loading
Loading