Release process¶
How a CredenceStack release is checked, built and published. No credential is stored anywhere: PyPI publishing uses trusted publishing (OpenID Connect), and the GitHub release uses the workflow's own token.
1. Prepare¶
- Set the version in
pyproject.toml(version, a PEP 440 form such as1.0.0or1.0.0rc1). The package reads its version from the installed metadata, so there is no second copy to update. - Give
CHANGELOG.mda section## [<version>] - <date>; its text becomes the release notes. - Regenerate everything generated (see Testing) and commit.
2. Check, from a clean checkout¶
uv sync --all-groups --extra bench --extra otel
scripts/release_check.sh # or --skip-extras to skip the per-connector installs
scripts/release_check.sh builds the distributions and checks, in order:
- Install: the wheel in a fresh environment, the README quickstart word for word, the
core package with no extras (and no OpenTelemetry SDK;
--otelmust give a clear error), the[otel]extra in its own environment (print and export spans), and each connector extra in its own environment with its offline conformance run. - Docs and package:
mkdocs build --strict; the three generators'--check(gen_docs_reference.py,gen_doc_examples.py --only core dev otel,gen_dev_reference.py); the OpenTelemetry unit, golden and content-capture privacy tests andgen_otel_golden.py --check; the Collector test when Docker is running; the docs audit; the stealth check;twine check --strict; andscripts/check_dist.py, which refuses distributions that contain anything private or local. - Version consistency:
scripts/release_version.py(the tag,pyproject.tomlandCHANGELOG.mdagree) andcredencestack --versionfrom the wheel. - Confidential fixtures: the test fixtures under
tests/fixtures/confidential/are in neither the distributions nor the docs build. - Secrets: no real keys or tokens in the tree or the history.
It exits 0 when everything passes. Fix every failure before tagging.
The stealth check (scripts/stealth_check.sh) also runs as a pre-commit and commit-message
hook, over the tree and the history. The private-content check runs as a pre-commit hook.
3. Tag¶
git tag -s v1.0.0 -m "CredenceStack v1.0.0"
git push origin v1.0.0
A tag with a hyphen (v1.0.0-rc1) is published as a pre-release.
4. What release.yml does¶
.github/workflows/release.yml runs only on v* tags, with read-only permissions by
default and each job granted only what it needs:
| Job | Permissions | Steps |
|---|---|---|
| Build and check | contents: read |
release_version.py --tag (and the release notes); uv build; twine check --strict and check_dist.py; the wheel installed in a fresh environment, credencestack --version and packs validate. No build cache, to avoid cache poisoning. |
| Attest build provenance | id-token: write, attestations: write |
actions/attest-build-provenance over dist/*: a signed provenance statement linking each file to this workflow run. |
| Publish to PyPI | id-token: write |
pypa/gh-action-pypi-publish in the pypi environment, through trusted publishing: PyPI accepts the workflow's OIDC token, so no API token exists. |
| GitHub release | contents: write |
gh release create with the distributions and the notes, --prerelease for hyphenated tags. |
One-time setup, done by a maintainer: on PyPI, a trusted publisher for this repository,
workflow release.yml and environment pypi; on GitHub, the pypi environment, ideally
with required reviewers.
5. After the release¶
- Check that the attestation verifies:
gh attestation verify <wheel> --repo <owner>/<repo>. - The docs site deploys from
main(.github/workflows/docs.yml). It is not versioned: per-release docs needmike, which is not a dependency yet. Adding it means adocsgroup entry,mike deploy 1.0 latestin the workflow and the version selector inmkdocs.yml. - The sample report is rebuilt only when its content changes, with
scripts/build_sample_report.py --key <demo key outside the repository>; the demo private key never enters the repository.
Security fixes¶
Reports come in privately, as described in the security policy. A fix is released as a patch version through the same steps; only the latest minor release receives security fixes.