This document explains how the automated publishing workflow works and how to create releases.
The GroundCUA package is automatically published to PyPI whenever a new GitHub release is created. The workflow uses GitHub Actions with trusted publishing for secure, tokenless deployment.
Before you can publish to PyPI, you need to:
-
Set up PyPI Trusted Publishing (one-time setup):
- Go to https://pypi.org/manage/account/publishing/
- Add a new pending publisher with:
- PyPI Project Name:
groundcua - Owner:
xhluca(or your GitHub username/org) - Repository name:
GroundCUA - Workflow name:
publish-python.yaml - Environment name:
pypi
- PyPI Project Name:
-
Configure GitHub Environment (optional, for additional protection):
- Go to your repository Settings → Environments
- Create an environment named
pypi - Add protection rules if desired (e.g., required reviewers)
To publish a new version to PyPI:
-
Update the version (optional - the workflow will do this automatically):
# The workflow will update groundcua/version.py based on the release tag -
Create a new release on GitHub:
- Go to https://github.com/xhluca/GroundCUA/releases/new
- Choose a tag name (e.g.,
v0.0.2,v0.1.0, etc.) - Tag should follow semantic versioning:
vMAJOR.MINOR.PATCH - Fill in the release title and description
- Click "Publish release"
-
Automatic publishing:
- The GitHub Actions workflow will automatically:
- Update
groundcua/version.pywith the release tag - Build the package
- Publish to PyPI using trusted publishing
- Update
- The GitHub Actions workflow will automatically:
-
Verify the release:
- Check the Actions tab for workflow status
- Visit https://pypi.org/project/groundcua/ to see the new version
To test the package locally before publishing:
# Install in development mode
pip install -e .
# Or build the package locally
python -m build
# Install from the built package
pip install dist/groundcua-0.0.1-py3-none-any.whlAfter publishing, users can install the package with:
# Basic installation
pip install groundcua
# With training dependencies
pip install groundcua[training]
# With all optional dependencies
pip install groundcua[all]If you have existing code using groundcua_utils.py, update your imports:
# Old way
from groundcua_utils import prepare_image, create_messages, GROUNDNEXT_SYSTEM_PROMPT
# New way
from groundcua import prepare_image, create_messages, GROUNDNEXT_SYSTEM_PROMPT- Follow semantic versioning:
MAJOR.MINOR.PATCH MAJOR: Breaking changesMINOR: New features (backward compatible)PATCH: Bug fixes (backward compatible)
Current version: 0.0.1