Repository navigation
ci: publish to PyPI from version tags - #8
Merged
Merged
Conversation
Samy-O7
approved these changes
Oct 22, 2026
Samy-O7
left a comment
There was a problem hiding this comment.
Approving. Checked:
- The structure matches the node SDK's publish workflow: no
id-tokenin the build job, areleaseenvironment gate, checksums, an SBOM, a gitleaks scan of the sdist and wheel, and a GitHub Release with the CHANGELOG notes. pypa/gh-action-pypi-publishis pinned to the v1.14.3 commit (the fix for GHSA-5xjx-3w67-w9x9). For this repository it builds its container from its own Dockerfile with hash-pinned requirements; thepython:3.13-slimbase image is the one input the pin doesn't freeze.- Locally,
python -m buildgives a wheel with only thecomposerpackage and its license files, and an sdist that adds the tests and setup files. gitleaks 8.30.1 with the workflow's flags finds no leaks,pip-auditon the wheel's runtime environment exits 0, andcyclonedx-py7.5.0 accepts the workflow's flags.
Before tagging, CHANGELOG.md needs a released ## 1.0.0 heading, and the PyPI pending publisher should be bound to this repository, publish.yml and the release environment.
Optional: setuptools>=77.0 in build-system.requires floats (84.2.1 today). Pinning it would make release builds reproducible.
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.
Changes
publish.yml: on av*tag, checks the tag matchespyproject.tomlandSDK_VERSION, the commit is onmain, andCHANGELOG.mdhas a released section for the versionid-token): builds the sdist and wheel, runs the tests, audits runtime dependencies withpip-audit(fails on any known advisory), writes a CycloneDX SBOM and SHA-256 checksums, and scans the distributions with gitleaksreleaseenvironment,id-token: writeandcontents: readonly): verifies checksums, fails if the version is already on PyPI, and publishes with PyPI trusted publishing viapypa/gh-action-pypi-publish, pinned by commit SHA, with PEP 740 attestationsSHA256SUMSand SBOM