Skip to content

refactor: release-PR flow with auto-release on merge to main#52

Merged
negillett merged 1 commit into
mainfrom
redesign-release-pr-flow
May 29, 2026
Merged

refactor: release-PR flow with auto-release on merge to main#52
negillett merged 1 commit into
mainfrom
redesign-release-pr-flow

Conversation

@negillett
Copy link
Copy Markdown
Owner

Summary

Simplifies releases to the standard release-PR pattern and fixes two defects in the prior design (deploying/tagging from an unmerged release/* branch).

  • release-pr.yml (workflow_dispatch): bump version files, open release/vX.Y.Z PR to main. No publish/deploy.
  • release.yml (push: main): if the current version has no tag yetchecktestpublish-pypipublish-mcp-registry + deploy (parallel) → finalize (tag + GitHub release).
  • Removes gate, prepare, validate-version, finalize-tag, sync-main, the dual trigger, and the tag_only first-release path (0.1.0 already shipped).
  • PyPI publish uses skip-existing: true; registry publish already idempotent → failed runs are safely re-runnable.
  • bump_version.py drops the unused allow_unchanged/tag-only coupling.
  • Docs (publishing.md, distribution.md) updated.

Why it's better

  • Production always deploys what's on main; every vX.Y.Z tag points at a real main commit.
  • Tag is created in the same run the merge triggers, so it never depends on GITHUB_TOKEN tag-push events — no PAT needed.
  • ~9 jobs across a dual-trigger workflow down to a single-trigger 6-job pipeline.

Test plan

  • pytest -q (262 passed)
  • actionlint on all workflows
  • Dry-run: run release-pr for next version, confirm PR opens; merge and confirm release tags + publishes + deploys

Replace the all-in-one release workflow with two simple ones:

- release-pr (dispatch): bump version files, open release/vX.Y.Z PR.
- release (push to main): release when the version has no tag yet,
  then test, publish to PyPI + MCP Registry, deploy to the VPS, and
  finally tag and create the GitHub release.

Production now always deploys what is on main, and each tag points
at a real main commit. Drops the dual trigger, prepare/validate/
finalize-tag/sync-main branch juggling, and the first-release
tag_only path. PyPI publish uses skip-existing for safe re-runs.
@negillett negillett merged commit 0a6f5b7 into main May 29, 2026
1 check passed
@negillett negillett deleted the redesign-release-pr-flow branch May 29, 2026 14:14
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