PyPI deployment is automated via .github/workflows/publish.yaml. On each published GitHub Release, CI runs unit and BDD tests, builds the distribution with uv build, and uploads to PyPI using OIDC trusted publishing (no long-lived API tokens in GitHub Secrets).
Before the first automated publish from this repository, configure a trusted publisher on pypi.org:
| Field | Value |
|---|---|
| PyPI project name | aptos-sdk |
| Owner | aptos-labs |
| Repository name | aptos-python-sdk |
| Workflow name | publish.yaml |
| Environment name | pypi |
Then create a GitHub environment named pypi under Settings → Environments (no secrets required for OIDC).
- Bump
versioninpyproject.tomland add a dated section toCHANGELOG.md. - Merge the version bump to
main. - Create a GitHub Release from
main:- Tag:
v<version>(must matchpyproject.toml, e.g.v0.12.0for version0.12.0) - Title:
v<version> - Paste the new
CHANGELOG.mdsection as release notes
- Tag:
- Click Publish release. The
Publish aptos-sdk to PyPIworkflow runs automatically.
To dry-run the pipeline without publishing, run the workflow manually from the Actions tab with Dry run enabled (tests and build only). A manual publish (Dry run disabled) must be dispatched from a v* tag that matches pyproject.toml.
uv build