Create new release workflow#558
Open
nickclyde wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #558 +/- ##
=======================================
Coverage 96.03% 96.03%
=======================================
Files 46 46
Lines 2368 2368
=======================================
Hits 2274 2274
Misses 94 94 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Implements #547. Adds a versioned release workflow so that bumping
versionin the rootpyproject.tomland merging tomainproduces avX.Y.Zgit tag, three semver-tagged Lambda images on APHL ECR (and GHCR), a published GitHub Release with auto-generated notes, and a Slack notification.Changes
.github/workflows/_build-and-push.yml- reusableworkflow_callworkflow that does a matrix build (index/ttc/augmentation), GHCR push, and APHL ECR retag+push. Shared between the dev and release flows..github/scripts/detect_version_bump.py- shared helper that parses old vs. newpyproject.toml[project].versionwithtomllib, validates strictX.Y.Z, and writesis_release/version/minor/majorto$GITHUB_OUTPUT. Called from both the release and dev workflows..github/workflows/release.yml- triggers onpushtomain. Three jobs:detect-releaseruns the shared script and, if a release was detected, tags the merge commit. The tag step is idempotent (if SHA is same it proceeds; if SHA is different it fails).buildinvokes the reusable workflow withvX.Y.Z/vX.Y/vX/latesttags.releasecreates the GitHub Release (generate_release_notes: true) with a fallback fetch for re-runs, then posts to Slack..github/workflows/docker-image-push.yml- adds adetect-bumpgate (using the same shared script) so the dev flow skips release commits, and delegates the build to the reusable workflow. Schedule andworkflow_dispatchtriggers are preserved.dev_scripts/version_name.sh-pyproject.tomlversionis now the single source of truth; no callers remain.docs/releases.md- Now describes the bump-version-and-merge flow, verification checklist, hotfix flow, and failure modes.Notes for reviewers
GITHUB_TOKEN-pushed tag would not fire a downstream workflow). Everything happens in one workflow run.vX.Y.Z,vX.Y,vX,latest. The major/minor tags are mutable; onlyvX.Y.Zis immutable.0.1.0→0.2.0, producing tagv0.2.0.Test plan
pyproject.tomlversion bump. Confirm:releaseworkflow runs,detect-releaseoutputsis_release=false,buildandreleasejobs are skipped;docker-image-push.ymlruns and pushes:latest+:mainvia the reusable workflow.pyproject.tomlversionfrom0.1.0→0.2.0. Merge. Confirm:v0.2.0tag exists on origin pointing at the merge commitindex/ttc/augmentationwith:v0.2.0,:v0.2,:v0,:latestv0.2.0published with auto-generated PR notesdocker-image-push.ymlbuildjob is skipped on the release commit