Document automated PyPI publishing and validate release tags - #116
Merged
Conversation
The publish pipeline (tests, build, OIDC upload on GitHub Release) was already on main. This fills the remaining gaps: - Expand CONTRIBUTING.md with trusted-publisher setup, release steps, and dry-run instructions (replacing the outdated tag-only push docs). - Fail the build job early when a release tag does not match pyproject.toml. Co-authored-by: Greg Nazario <greg@gnazar.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
- Coverage 93.20% 92.97% -0.24%
==========================================
Files 56 56
Lines 5183 4952 -231
==========================================
- Hits 4831 4604 -227
+ Misses 352 348 -4
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Documents the intended automated PyPI release process for the Aptos Python SDK and adds a CI guard to ensure GitHub Release tags align with the package version in pyproject.toml, reducing the risk of publishing a mismatched version.
Changes:
- Expanded
CONTRIBUTING.mdwith one-time trusted publisher setup steps and an explicit GitHub Release-based publishing flow. - Added an early workflow check to fail the publish pipeline if the release tag doesn’t match the package version.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
CONTRIBUTING.md |
Documents the automated PyPI publishing setup and the recommended release workflow. |
.github/workflows/publish.yaml |
Adds a tag/version consistency check before building artifacts for release publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Run version check for workflow_dispatch publishes (not just releases). - Require manual publishes to be dispatched from a matching v* tag. - Read pyproject.toml with stdlib python/pathlib instead of uv run. Co-authored-by: Greg Nazario <greg@gnazar.io>
Co-authored-by: Greg Nazario <greg@gnazar.io>
Boolean inputs are passed as strings in GitHub Actions expressions. Compare explicitly against false/'false' instead of !inputs.dry_run so version validation and publish gating work when Dry run is disabled. Co-authored-by: Greg Nazario <greg@gnazar.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Addresses #28 / aptos-core#7410.
Automated PyPI deployment is already implemented on
mainvia.github/workflows/publish.yaml(added ina468fa4). On a published GitHub Release, CI:uv buildpypa/gh-action-pypi-publish,pypienvironment)This PR closes the remaining gaps:
pyproject.tomlversion (e.g. tagv0.12.0requires version0.12.0), including for manualworkflow_dispatchpublishes.Maintainer action still required
Before the first automated publish from this repo, a maintainer must:
aptos-sdkpointing ataptos-labs/aptos-python-sdk, workflowpublish.yaml, environmentpypi.pypiGitHub environment (no secrets needed).After that, publishing is: bump version → merge → create GitHub Release → done.
Test Plan
uv buildsucceeds locally.workflow_dispatchis unaffected.Related Links