Release Process¶
This document describes the automated release process for httptap.
Overview¶
Releases are fully automated using GitHub Actions. The workflow handles versioning, changelog generation, testing, building, signing, publishing to TestPyPI and PyPI, and pushing a signed container image to GHCR.
Prerequisites¶
Before creating a release, ensure:
- GitHub Environments -
release,testpypi, andpypienvironments configured in repository settings - PyPI Trusted Publishing - Configured for both PyPI and TestPyPI (OIDC, no tokens)
- Deploy Key - SSH deploy key with write access (for bypassing branch protection)
- GHCR access -
packages: writepermission on the release job (granted per-workflow) - All tests passing - CI must be green on main branch
Release Workflow¶
The release process is triggered manually via GitHub Actions.
Triggering a Release¶
- Go to Actions → Release workflow
- Click Run workflow
- Choose version strategy:
- Explicit version: Enter exact version (e.g.,
0.3.0) - Semantic bump: Select
patch,minor, ormajor
- Explicit version: Enter exact version (e.g.,
Semantic Versioning¶
| Bump Type | Example | Use Case |
|---|---|---|
patch |
0.1.0 → 0.1.1 | Bug fixes, small improvements |
minor |
0.1.0 → 0.2.0 | New features, backwards compatible |
major |
0.1.0 → 1.0.0 | Breaking changes |
What Happens Automatically¶
-
Version Update
Updatesversioninpyproject.toml -
Lockfile Refresh
Regeneratesuv.lockso it stays in sync with the new version -
Changelog Generation
Generates changelog from conventional commits -
Signed Commit and Tag
Keyless Sigstore signing via gitsign: a short-lived Fulcio certificate is issued through the workflow's OIDC identity, so no long-lived GPG keys are required.git commit -S -m "chore: release v0.2.0" git tag -s v0.2.0 -m "Release v0.2.0" git push origin HEAD git push origin v0.2.0 -
Build
-
Publish to TestPyPI
- Uploads to TestPyPI first via OIDC Trusted Publishing, with PEP 740 attestations, as a smoke test before the production push.
-
Publish to PyPI
- Uses OIDC Trusted Publishing (no tokens required)
- Uploads wheel and source distribution with PEP 740 attestations
-
Publish container image to GHCR
- Builds multi-arch (linux/amd64, linux/arm64) image
- Pushes to
ghcr.io/ozeranskii/httptapwith{version},{major}.{minor},{major}, andlatesttags - Signs the image with cosign (keyless Sigstore)
- Attaches SLSA build provenance via
actions/attest-build-provenance
-
GitHub Release
- Creates release with generated notes
- Attaches build artifacts, SBOMs, VEX, and the man page
Workflow Configuration¶
The release workflow is defined in .github/workflows/release.yml:
Key Jobs¶
1. Prepare Release¶
- Checks out code with deploy key
- Configures Python and uv
- Updates version in pyproject.toml
- Generates changelog
- Commits and pushes changes
- Creates and pushes git tag
2. Build Package¶
- Checks out the tagged version
- Runs full test suite
- Builds wheel and sdist
- Generates SBOM in CycloneDX and SPDX JSON formats via Syft
- Copies the versioned OpenVEX document from
.vex/httptap.openvex.jsoninto thesbom/directory ashttptap-X.Y.Z.openvex.json - Generates a gzipped
man(1)page with argparse-manpage - Uploads
dist/,sbom/, andman/artifacts separately
3. Publish to TestPyPI¶
- Downloads
dist/artifacts - Publishes via TestPyPI OIDC Trusted Publishing with PEP 740 attestations
4. Publish to PyPI¶
- Runs only after TestPyPI succeeds
- Publishes using Trusted Publishing with PEP 740 attestations
5. Publish container image to GHCR¶
- Builds multi-arch image with Buildx + QEMU
- Signs with cosign (keyless Sigstore OIDC)
- Attaches SLSA build provenance
6. Create GitHub Release¶
- Downloads
dist/,sbom/, andman/artifacts - Creates GitHub release with changelog notes
- Attaches wheel, sdist, SBOM (
*.cdx.json,*.spdx.json), VEX (*.openvex.json), and the man page
Changelog Generation¶
Changelogs are automatically generated using git-cliff based on conventional commits.
Commit Format¶
Supported Types¶
| Type | Changelog Section | Example |
|---|---|---|
feat |
Features | feat(cli): add --timeout flag |
fix |
Bug Fixes | fix(tls): handle expired certificates |
perf |
Performance | perf(dns): optimize resolver cache |
docs |
Documentation | docs: update API reference |
refactor |
Refactor | refactor(core): extract analyzer logic |
test |
Testing | test: add integration tests |
chore |
Miscellaneous | chore: update dependencies |
Breaking Changes¶
Mark breaking changes in commit footer:
feat(api): redesign analyzer interface
BREAKING CHANGE: HTTPTapAnalyzer constructor signature changed
Version Strategy¶
httptap follows Semantic Versioning:
- Major version (1.0.0) - Breaking changes
- Minor version (0.1.0) - New features, backwards compatible
- Patch version (0.0.1) - Bug fixes
Pre-1.0 Development¶
During pre-1.0 development (0.x.x):
- Minor version may include breaking changes
- Patch version for bug fixes and minor features
- Move to 1.0.0 when API is stable
Manual Release Steps¶
If you need to release manually (not recommended):
1. Update Version¶
2. Regenerate Lockfile¶
3. Generate Changelog¶
4. Commit Changes¶
5. Create Tag¶
6. Push¶
7. Build and Publish¶
7. Create GitHub Release¶
Use gh CLI or web interface to create release with changelog notes.
Troubleshooting¶
Branch Protection Errors¶
If push fails due to branch protection:
- Verify deploy key has write access
- Check deploy key is in bypass list for branch protection rules
- Ensure
ssh-keyis configured in workflow checkout
Changelog Empty¶
If changelog generation returns empty:
- Ensure commits follow conventional format
- Check git-cliff configuration in
.release/git-cliff.toml - Verify tag doesn't already exist
PyPI Publishing Fails¶
If PyPI publishing fails:
- Verify
pypienvironment exists - Check Trusted Publishing is configured on PyPI
- Ensure workflow has
id-token: writepermission
Test Failures¶
If tests fail during release:
- Workflow will stop before publishing
- Fix issues and re-run workflow
- No partial releases will occur
Post-Release¶
After successful release:
- Verify package on PyPI: https://pypi.org/project/httptap/
- Check GitHub release: https://github.com/ozeranskii/httptap/releases
- Test installation:
uv pip install httptap=={version} - Announce release (Twitter, Discord, etc.)
Release Checklist¶
Before triggering release:
- All CI checks passing on main
- No known critical bugs
- Documentation updated
- Breaking changes documented
- Migration guide written (for major versions)
- Dependencies updated
- Security vulnerabilities addressed