Skip to content

Prepare version-bump PRs and publish after merge - #77

Closed
Dale (dalemyers) wants to merge 3 commits into
mainfrom
release/manual-version-bump
Closed

Dale (dalemyers) wants to merge 3 commits into
mainfrom
release/manual-version-bump

Conversation

@dalemyers

@dalemyers Dale (dalemyers) commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add a manual Prepare release PR workflow with patch/minor/major inputs. It updates pyproject.toml and creates or updates a normal release/version-bump PR using a scoped GitHub App token.
  • Keep required review and CI intact. There is no automatic merge, direct version-commit push to main, or branch-protection bypass.
  • When a version change reaches main, build the exact merged commit, push only its version tag, create a GitHub release, publish to PyPI, and attach signed distributions in the same run.
  • Skip publishing for dependency-only metadata changes. Reject existing tags that point at different source, including conflicting remote tags.
  • Retain manual existing-version publishing, default TestPyPI publishing, and manually published GitHub release triggers.

Setup

For automated PR creation, install an organization-approved GitHub App with Contents: read/write and Pull requests: read/write. Configure RELEASE_APP_CLIENT_ID as an Actions variable and RELEASE_APP_PRIVATE_KEY as an Actions secret. The token is limited to this repository and these permissions. No RELEASE_TOKEN or permission-bypass setting is needed.

If App setup is unavailable, a maintainer can open the version-bump PR manually; the same post-merge publication runs without App credentials. Existing PyPI/TestPyPI trusted publishing remains in publish.yml. Tag rules must allow Actions to create release tags.

Validation

  • 23 focused regression cases cover input validation, real Poetry bumps, unchanged versions, missing history, exact merged-SHA tagging, local/remote tag conflicts, and permission/event routing.
  • Tests use local temporary Git repositories; no release or package was published.
  • Both workflows pass actionlint; the regression tests pass Black, Pylint, mypy, and Pyright.

Dale Myers and others added 3 commits October 6, 2026 17:44
Adapt asconnect's patch/minor/major release flow while retaining existing PyPI and TestPyPI publishing. Require a protected-branch release token for atomic version commit and tag pushes, and publish within the same workflow run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep main's pinned action updates alongside the manual release checkout configuration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a scoped GitHub App token to open normal version-bump PRs. Publish only actual version changes after they reach main, tagging the exact merged commit without pushing to protected branches. Preserve manual PyPI and TestPyPI publishing and document the credential-free manual PR path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dalemyers Dale (dalemyers) changed the title Add manual version bump and release automation Prepare version-bump PRs and publish after merge Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant