[CLI] Pipelines to publish casp to PyPI #5061
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR establishes the CI/CD pipelines required to automate the publishing of the casp CLI to both TestPyPI (for development) and PyPI (for production).
Pipelines Added
1. Publish to PyPI (release event)
Trigger: runs when a new GitHub Release is published.
Change Detection: checks if there are actual changes in
cli/caspcompared to the previous tag before proceeding.Versioning: automatically updates
pyproject.tomlto match the release tag (e.g., v1.2.0 -> 1.2.0).Action: builds and uploads the package to the official PyPI repository.
2. Publish to TestPyPI (push event)
Trigger: runs on every push to master that modifies files within
cli/casp/.Versioning: generates a unique snapshot version using the format
<last_tag>.<timestamp>(e.g., 1.2.0.17123456).Action: builds and uploads the package to TestPyPI to facilitate immediate testing of new changes.