Releasing
Releases are fully automated via
..
The workflow uses PyPI Trusted Publishing
(OIDC) - there are no long-lived API tokens stored in GitHub secrets.
One-time setup
- Create the project on PyPI and TestPyPI (blank projects are fine).
- On each, add a Trusted Publisher pointing at this repo:
- Owner:
cpeoples - Repository:
ansible-security-scanner(or wherever this lives) - Workflow name:
scanner-release.yml - Environment name:
pypi(for PyPI) /testpypi(for TestPyPI)
- Owner:
- In GitHub -> Settings -> Environments, create two environments with
matching names:
pypiandtestpypi. Add required reviewers topypiif you want a manual approval gate before production uploads.
Cutting a release
Publishing the Release triggers:
- Build - produces sdist + wheel, version derived from the git tag.
- TestPyPI - upload via OIDC, then install in a clean Python and verify the CLI runs.
- PyPI - production upload (gated by the
pypienvironment if you configured reviewers). - Attest - generates SLSA build provenance and Sigstore signatures, then attaches them to the GitHub Release so consumers can verify the artifact’s origin.
Need a dry run? Trigger scanner-release. manually with
publish_ - it goes to TestPyPI only.