Skip to content

Migrate to release train model#211

Open
pnewsam wants to merge 2 commits into
mainfrom
release-train-migration-v2
Open

Migrate to release train model#211
pnewsam wants to merge 2 commits into
mainfrom
release-train-migration-v2

Conversation

@pnewsam

@pnewsam pnewsam commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Context

We are migrating all repos to a release train model as described in the release train migration plan. The key changes:

  1. Branch/environment realignment: Previously, main mapped to staging and a GitHub Release triggered production. Now, staging branch maps to staging and main maps to production.

  2. Automated CalVer versioning: Instead of manual version bumps and release creation, every push to main automatically computes a CalVer version (MAJOR.YY.M.DD.seq), tags the commit, and creates a GitHub Release with changelog. This is the same versioning scheme used by Anton today.

Changes

  • release.yml: rewritten to auto-compute CalVer version on every push to main, replacing the old path-filter trigger on anton/__init__.py. The workflow now computes the version from git tags, writes it to __init__.py, commits with [skip ci], tags, creates a GitHub Release, publishes to PyPI, and runs e2e tests. No manual version bumps needed.

Test plan

  • Merge a test PR to main → verify CalVer tag is created and GitHub Release appears
  • Verify PyPI publish succeeds with new CalVer version
  • Verify e2e tests run against the new release tag
  • Confirm version-bump commit does NOT re-trigger the workflow

🤖 Generated with Claude Code

Rewrite release.yml to auto-compute CalVer version on every push to
main, instead of triggering on manual version bumps to __init__.py.

- Remove path filter on anton/__init__.py (version is now auto-computed)
- Compute CalVer version from git tags (MAJOR.YY.M.DD.seq)
- Write version to __init__.py, commit with [skip ci], tag, release
- Publish to PyPI and run e2e tests (preserved from old workflow)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pnewsam pnewsam requested a review from a team as a code owner June 23, 2026 23:57
- Move CALVER_MAJOR to workflow-level env var (no magic number)
- Remove __init__.py version update + commit to main (avoids
  branch protection issues and fragile sed)
- Switch hatch version source from regex to vcs (hatch-vcs)
- Add fetch-depth: 0 to publish checkout so hatch-vcs can read tags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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