Repository navigation
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Problem / Motivation
PyPI publishing is already automated for pushed v* tags, but preparing a release still requires manually updating the package version and creating a matching tag. There is currently no Release Drafter configuration or workflow to calculate the next version from pull-request labels and maintain release notes.
Current State
pyproject.tomldeclares a static package version (0.1.0)..github/workflows/release.ymlruns on pushedv*tags and rejects tags that do not match the declared package version.CONTRIBUTING.mddocuments manually setting the version and pushing a matching tag.- The existing pipeline builds, verifies, publishes through PyPI Trusted Publishing, and verifies the published package.
Proposed Solution
Use Release Drafter to maintain draft release notes and resolve the next semantic version from labels on merged pull requests. Connect that resolved version to release preparation so package metadata, the lockfile, the GitHub release, and its tag stay consistent without manual version editing. Maintainers should retain control over when a release is published.
Acceptance Criteria
- Add Release Drafter configuration and a workflow that maintains a draft release from merged PRs on the default branch.
- Define and document labels for major, minor, and patch releases; use the highest applicable bump across merged PRs and document the behavior for unlabeled PRs.
- Automatically prepare the resolved package version in
pyproject.tomland keepuv.lockconsistent before building release artifacts. - Ensure the release tag and published Python package version match, using a Python-compatible version format.
- Explicitly connect the release/tag creation mechanism to the publishing pipeline, accounting for GitHub token event-trigger restrictions so an automated release actually starts publishing.
- Preserve the existing build/verification checks, tag/version mismatch guard, and PyPI Trusted Publishing flow.
- Verify patch/minor/major resolution, mixed-label precedence, unlabeled PR behavior, version/lockfile consistency, and repeat runs without duplicate releases or publications.
- Update
CONTRIBUTING.mdwith the label policy and maintainer release process.
Related Files
.github/workflows/release.yml.github/workflows/publish-testpypi.ymlpyproject.tomluv.lockCONTRIBUTING.md
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Activity
feat(ci): automate label-based release versioning with Release Drafter (
imshubham22apr-gif commentedon Nov 10, 2026
Hi @jpower432,
I've implemented the label-based release automation requested here and opened pull request #24.
Highlights of the implementation:
.github/release-drafter.ymland workflow withrelease:major,release:minor, andrelease:patchlabels. Unlabeled PRs default topatch, andskip-changelogPRs are excluded from notes and version resolution.workflow_dispatchworkflow (.github/workflows/prepare-release.yml) and validation tool (tools/validate_release_version.py) to validate the target SemVer against the active draft tag, updatepyproject.tomlanduv.lock, run test/lint/typecheck suites, and open/update a predictablerelease-prep/v<version>PR..github/workflows/release.ymlto trigger onrelease: types: [published]. Maintainers publish the draft in GitHub's UI, generating a human event that reliably triggers the publishing pipeline.tests/tools/test_release_version.pycovering all label scenarios (all 134 tests passing), verified cleanzizmoraudits across workflows, and updatedCONTRIBUTING.md.Please see PR #24 for the full diff and verification details.
feat(ci): automate label-based release versioning with Release Drafter (
jpower432 commentedon Nov 10, 2026
@imshubham22apr-gif Apologies, I missed a constraint in the Issue body. We typically use https://github.com/github-community-projects/ospo-reusable-workflows (@jmeridth -- probably worth is putting in the global contributing guide). I think we still need the Python specific logic here, but the label-based release drafter automation is handled through these central workflows.
feat(ci): automate label-based release versioning with Release Drafter (
feat(ci): automate label-based release versioning with Release Drafter (