Migrate to release train model#211
Open
pnewsam wants to merge 2 commits into
Open
Conversation
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>
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
We are migrating all repos to a release train model as described in the release train migration plan. The key changes:
Branch/environment realignment: Previously,
mainmapped to staging and a GitHub Release triggered production. Now,stagingbranch maps to staging andmainmaps to production.Automated CalVer versioning: Instead of manual version bumps and release creation, every push to
mainautomatically 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
main, replacing the old path-filter trigger onanton/__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
main→ verify CalVer tag is created and GitHub Release appears🤖 Generated with Claude Code