Skip to content

[Feature Request]: Automated Python Package Versioning in CI/CD #69

Description

@bamr87

Automate SemVer versioning for this repo via GitHub Actions — increment major/minor/patch from commit messages, commit the updated version file, tag the release, and optionally publish to PyPI.

Intake found this request is largely obsolete. It was filed 495 days ago, and in the meantime .github/workflows/claude-release.yml shipped and does most of what is asked. Two of the original acceptance criteria are now moot or contradicted by the repo's current documented design, and one rests on a premise that is false for this repository: GitHubAI ships no Python package, so there is nothing to version as a distribution and nothing to publish to PyPI. What remains is one small trigger gap and one product decision.

Context

bamr87/githubai is a reusable GitHub Actions / prompt framework consumed by git ref (uses: bamr87/githubai/.github/workflows/claude-release.yml@main), not a distributable Python artifact. Its pyproject.toml says so in its own first line:

# GitHubAI ships no Python package; this file configures the dev tooling for
# the framework's self-tests (config loader + structure validation).

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"

[tool.ruff]
line-length = 120
extend-exclude = ["tools/unwrap-prose.py"]

There is no [project] table, no setup.py, and no build backend. The repo does carry a repo-level VERSION file (1.0.0-alpha.1), which is the thing worth versioning — and which claude-release.yml already manages.

Reproduction

Not a defect, so there is no failure to reproduce. The relevant observation is what already exists in the repository at main @ ab0ca8a:

$ ls .github/workflows/
ci.yml                 claude-implement.yml   claude-release.yml   claude-triage.yml
claude-auto-merge.yml  claude-maintenance.yml claude-review.yml    claude.yml
markdown-oneline.yml

$ cat VERSION
1.0.0-alpha.1

$ ls CHANGELOG.md
ls: cannot access 'CHANGELOG.md': No such file or directory

claude-release.yml's own header states its two modes:

# GitHubAI - release automation. Two modes:
#   prepare (workflow_dispatch): Claude inspects commits since the last tag,
#     picks the semver bump, updates VERSION and CHANGELOG.md, and opens a
#     release PR through the normal review lane.
#   publish (tag push v*): Claude drafts categorized release notes from the
#     commit range and creates the GitHub Release (draft by default).

on:
  push:
    tags: ["v*"]
  workflow_dispatch:
    inputs:
      bump: { default: auto, type: choice, options: [auto, major, minor, patch] }
  workflow_call:
    ...

And docs/workflows.md:43-47 documents it, including a deliberate design constraint:

Behavior: publish = categorized release notes from the tag range → GitHub release (draft per config). Prepare = pick the semver bump from commits (or honor the input), update VERSION/CHANGELOG.md on a branch, open a release: vX.Y.Z PR. Tags are never created by automation — pushing the tag stays a human act.

The original acceptance criteria, re-scored against today's main

# Original criterion Status
1 Workflow triggers correctly on pushes to main genuine gap — prepare mode is workflow_dispatch / workflow_call only; there is no push: branches: [main] trigger
2 Version increment logic interprets commit message tags ⚠️ implemented differentlybump: auto has Claude infer the bump from the commit range, rather than parsing literal [major] / [minor] markers
3 Updated versions are committed, tagged, and pushed automatically deliberately refused — the repo documents "tags are never created by automation". Versions are committed on a branch via a release PR; a human merges and tags
4 Documentation on usage included in the README met — documented in docs/workflows.md, with docs/ linked from README.md
5 Optionally publish to PyPI not applicable — no Python package exists to publish

Environment

key value
repo / ref bamr87/githubai @ main ab0ca8a
detected stack python
runner Linux 6.17.0-1022-azure x86_64
captured 2026-08-16 08:10 UTC
python3 3.12.3
node / npm v22.23.2 / 10.9.8
ruby 3.2.3 · go 1.24.13 · cargo 1.97.1
sandbox phases clone ✅ 1s · python-venv ✅ 3s · python-install ✅ 0s · python-test ❌ 127 · python-lint ❌ 127 · screenshot

The two ❌ phases are harness bugs, not repository failures — see the intake comment. tools/issue-evidence.sh builds the interpreter path relative to the output directory and then cds into the workspace before using it, so .venv/bin/python cannot resolve and every Python repo in the fleet reports exit 127 for python-test and python-lint. Nothing is known to be wrong with this repo's test suite; intake was unable to execute it.

Expected vs actual

Expected (as originally requested): a push to main automatically bumps the version per commit-message tags, commits, tags, and publishes the Python package.

Actual (today): a maintainer dispatches claude-release.yml (or another workflow calls it); Claude reads the commits since the last tag, chooses the bump, writes VERSION and CHANGELOG.md on a branch, and opens a release: vX.Y.Z PR into the normal review lane. A human merges and pushes the tag; the tag push then triggers publish mode, which drafts categorized notes and creates a draft GitHub Release. No package is published anywhere, because none is built.

The delta between the two is therefore one missing trigger plus two intentional design differences — not a missing feature.

Scope

rank file why
1 .github/workflows/claude-release.yml the existing implementation; the only change in scope would be adding a push: branches: [main] trigger for prepare mode (guarded so it does not fire on the release PR's own merge)
2 docs/workflows.md L43-47 documents the current behaviour and the "tags stay a human act" rule — must be updated if that rule changes
3 CHANGELOG.md (absent) claude-release.yml claims to update it, but the file does not exist in the repo. Small real inconsistency worth closing either way
4 VERSION 1.0.0-alpha.1 — the artifact actually being versioned
5 pyproject.toml establishes that no Python package exists; only relevant as the evidence that criteria 5 is void

Out of scope, confirmed: bumpversion, Poetry, PyPI publishing, and any [project] packaging metadata. Adding packaging to make the original request satisfiable would be a much larger, separate proposal.

Acceptance criteria

This issue is blocked pending a decision (see the intake comment) — the criteria below are what I would apply under the recommended option.

  • A decision is recorded on the comment below: close as substantially delivered, narrow to the trigger gap, or migrate to the fleet's release-please standard.
  • If narrowed: claude-release.yml gains a push: branches: [main] trigger for prepare mode, guarded so merging a release: vX.Y.Z PR does not immediately open another one — verified by merging a normal PR (a release PR opens) and then merging that release PR (no second release PR opens).
  • docs/workflows.md is updated to describe whatever trigger set ends up shipping, and the "tags are never created by automation" sentence still matches reality.
  • CHANGELOG.md exists, or the reference to it in claude-release.yml is removed — checked by ls CHANGELOG.md agreeing with grep -n CHANGELOG .github/workflows/claude-release.yml.
  • actionlint passes on the modified workflow.
  • A test asserts the trigger guard (e.g. a workflow-condition unit check or a documented dry-run), failing before the change and passing after.
  • The issue title is corrected — it says "Python Package Versioning", which this repo does not do.

References


Original report by @bamr87

Describe your feature request clearly.

Description:
Automate Python package versioning adhering to Semantic Versioning (SemVer) standards using GitHub Actions. The CI/CD pipeline should automatically increment versions (major, minor, patch) based on commit messages containing specific tags (e.g., [major], [minor], defaults to patch).

Proposed Implementation:

  • Utilize tools such as bumpversion or Poetry to handle version increments.
  • Integrate a GitHub Actions workflow that detects specific tags in commit messages to trigger version bumps.
  • Automatically commit updated version files, tag releases, and optionally publish to PyPI.

Benefits:

  • Ensures consistent and error-free version management.
  • Reduces manual intervention, increasing efficiency.
  • Provides clear traceability through commit messages and tags.

Acceptance Criteria:

  • Workflow triggers correctly on pushes to main.
  • Version increment logic correctly interprets commit message tags.
  • Updated versions are committed, tagged, and pushed automatically.
  • Documentation on usage included in the repo's README.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3Low / somedayagent:blockedIssue pipeline — needs a human decisionai-assistciBuild / CI / automationsize:sA few hours

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions