Release Workflow
Release workflow for publishing tq to PyPI.
Package identity
- Repository and import package name is
tq. - Published distribution name is
tqlint. - CLI command exposed by the package is
tq.
User install and run commands
- Project dependency:
uv add --dev tqlintthenuv run tq check - Ephemeral execution:
uvx --from tqlint tq check - Global tool:
uv tool install tqlintthentq check
Publish automation
Publishing is handled by the publish workflow on SemVer tags matching <major>.<minor>.<patch>.
The workflow performs:
- download of the validated wheel and sdist produced by the successful tag CI run
- promotion of artifacts that were built in an unprivileged CI job and attested in a separate tag-only CI job
- verification of the CI-generated artifact attestations
- artifact content policy validation via
tq-release - package metadata validation (
twine check dist/*) - smoke checks against the validated wheel and sdist entrypoints
- fixture smoke validation with the validated wheel
- trusted publish with
uv publishon tag-triggered runs - post-publish smoke validation via
uvx --from tqlint tq - consumer provenance verification against the PyPI wheel
- GitHub release upload for wheel, sdist, and checksums
Dry-run validation happens in local release checks and in the tag-triggered CI build path before the publish workflow is allowed to promote artifacts.
Publishing runs in the pypi GitHub Actions environment. This environment must be configured with required reviewers for manual approval before publish runs.
Maintainer checklist
- Ensure
CHANGELOG.mdand version are ready. - Run the local validation commands:
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --lockedcargo run -p tq-docsgen --locked -- generate allcargo run -p tq-release --locked -- verify-dependabot --repo-root .cargo package --workspace --lockeduv build
- Create and push a signed release tag.
- Confirm the tag-triggered CI run completes, including the tag-only artifact attestation job.
- Approve the pending
pypienvironment deployment in GitHub Actions. - Confirm publish workflow success.
- Verify install paths in a clean environment:
uvx --from tqlint tq --helpuvx --from tqlint tq check --helpuv tool install tqlint && tq --help
Rollback guidance
- If publish fails before upload, fix workflow and re-run.
- If a bad version is published, publish a corrected patch release.
- Avoid deleting artifacts once consumed; prefer forward fix releases.
Versioning when tag-triggered publish fails
- Prefer cutting a new patch version tag after fixing workflow issues (for example,
0.4.0failed before upload → release0.4.1). - Update
CHANGELOG.mdfor the new version before tagging. - Avoid reusing or force-moving existing release tags unless you are intentionally rewriting release history.