Releases¶
Releases are built and published by .github/workflows/release.yml. It runs when a v* tag is pushed, or by hand from main (Actions → Release → Run workflow, with the version). The manual run creates the tag on the commit it built. The workflow:
- builds the sdist and wheel and runs
twine check; - checks that the tag matches the built version (
sanitizer_pro.__version__); - writes a CycloneDX SBOM (
sbom.cdx.json) of the wheel installed with the[all]extra; - signs every distribution with Sigstore (keyless, via GitHub's OIDC identity) and records SLSA build provenance with GitHub artifact attestations;
- publishes to PyPI with Trusted Publishing, which also uploads PEP 740 attestations;
- creates a GitHub release with the changelog section for the version, the distributions, their
.sigstore.jsonbundles and the SBOM.
Steps 5 and 6 run independently after the build. If the PyPI upload fails (for example invalid-publisher: no trusted publisher is registered), the GitHub release is still created. Fix the PyPI side, then use "Re-run failed jobs" on the same run.
Verifying a release¶
# GitHub artifact attestation (SLSA provenance)
gh attestation verify llm_sanitizer_pro-4.0.0-py3-none-any.whl --repo Yog-Sotho/LLM-Sanitizer-Pro
# Sigstore bundle from the GitHub release
python -m sigstore verify github llm_sanitizer_pro-4.0.0-py3-none-any.whl \
--bundle llm_sanitizer_pro-4.0.0-py3-none-any.whl.sigstore.json \
--repository Yog-Sotho/LLM-Sanitizer-Pro
Cutting a release¶
- Move the
Unreleasedsection ofCHANGELOG.mdunder a## X.Y.Z (date)heading. - Set
__version__insanitizer_pro/__init__.py. - Merge to
main, then eithergit tag vX.Y.Z && git push origin vX.Y.Z, or run the Release workflow onmainwith versionX.Y.Z.