Skip to content

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

  1. Set the version in pyproject.toml (version, a PEP 440 form such as 1.0.0 or 1.0.0rc1). The package reads its version from the installed metadata, so there is no second copy to update.
  2. Give CHANGELOG.md a section ## [<version>] - <date>; its text becomes the release notes.
  3. 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:

  1. Install: the wheel in a fresh environment, the README quickstart word for word, the core package with no extras (and no OpenTelemetry SDK; --otel must 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.
  2. 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 and gen_otel_golden.py --check; the Collector test when Docker is running; the docs audit; the stealth check; twine check --strict; and scripts/check_dist.py, which refuses distributions that contain anything private or local.
  3. Version consistency: scripts/release_version.py (the tag, pyproject.toml and CHANGELOG.md agree) and credencestack --version from the wheel.
  4. Confidential fixtures: the test fixtures under tests/fixtures/confidential/ are in neither the distributions nor the docs build.
  5. 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 need mike, which is not a dependency yet. Adding it means a docs group entry, mike deploy 1.0 latest in the workflow and the version selector in mkdocs.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.