feat(release): add release.yml triggered on SemVer tags (epic 005 T008) - #48
Conversation
Validates the tag against Cargo.toml's workspace version as the first real step, failing fast before any build/package work on a mismatch. Build, packaging, checksums, and atomic release creation are separate follow-up tasks (T009-T012) — this workflow does nothing else yet. Co-authored-by: Claude <noreply@anthropic.com>
Reviewer's GuideAdds a minimal GitHub Actions release workflow triggered by SemVer-like tags, wired to validate the tag against the workspace version, and marks task T008 as completed in the CI/release specs. Sequence diagram for SemVer-tag-triggered release validation workflowsequenceDiagram
actor Developer
participant GitHub
participant Release_workflow
participant actions_checkout
participant validate_release_tag_sh
Developer->>GitHub: push tag v1_2_3 (matches v[0-9]*)
GitHub->>Release_workflow: trigger push_tags_v[0-9]*
Release_workflow->>actions_checkout: actions_checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
actions_checkout-->>Release_workflow: workspace checked_out (fetch_depth_0, persist_credentials_false)
Release_workflow->>validate_release_tag_sh: validate-release-tag.sh GITHUB_REF_NAME
alt [tag matches workspace version]
validate_release_tag_sh-->>Release_workflow: success
else [tag mismatches workspace version]
validate_release_tag_sh-->>Release_workflow: failure (fail_fast)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Warning Review limit reached
Next review available in: 65 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since this phase only validates the tag and doesn’t create releases yet, you can tighten the workflow permissions to
contents: readand defercontents: writeuntil the release-creation steps are added. - If you want stricter SemVer enforcement on triggers, consider narrowing the tag pattern from
v[0-9]*to something likev[0-9]+.[0-9]+.[0-9]+*so non-SemVer tags don’t invoke the release workflow.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since this phase only validates the tag and doesn’t create releases yet, you can tighten the workflow permissions to `contents: read` and defer `contents: write` until the release-creation steps are added.
- If you want stricter SemVer enforcement on triggers, consider narrowing the tag pattern from `v[0-9]*` to something like `v[0-9]+.[0-9]+.[0-9]+*` so non-SemVer tags don’t invoke the release workflow.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
cubic-dev-ai and sourcery both flagged that this phase (T008) writes nothing to the repo yet, so granting contents: write pre-emptively violates the least-privilege stance ci.yml and this file's own comment already establish. Defer write to T012, the task that actually creates the GitHub Release. Co-authored-by: Claude <noreply@anthropic.com>
Agreed, fixed in 4d2c1ec.
Declining this one: GitHub Actions tag/branch filters use glob syntax, not regex — |
Summary
.github/workflows/release.yml, triggered onv[0-9]*tag pushes (epic 005, Phase 4 US2, T008).validate-release-tag.sh(T005) against the pushed tag — fails fast on a tag/version mismatch before any build/package work exists.Test plan
Psych, nopyyamlavailable locally)validate-release-tag.shre-run manually against this repo's realCargo.tomlversion for both a matching and mismatched tag — already covered by its own fixture tests from T005make build/make testgreenGITHUB_REF_NAMEplain env-var usage avoids the${{ }}-template shell-injection footgun, and action pinning matchesci.yml's convention🧙 Built with WOZCODE
Summary by Sourcery
Add a minimal GitHub Actions release workflow triggered by SemVer tag pushes that only validates the release tag against the workspace version as the first phase of the release pipeline.
CI:
Chores:
Summary by cubic
Validates SemVer tag pushes with a new release workflow. Previously tag pushes did nothing; now the job fails fast on a tag/version mismatch and stops before any build or release work.
v[0-9]*..github/scripts/validate-release-tag.shwithGITHUB_REF_NAME.actions/checkoutwithfetch-depth: 0andpersist-credentials: false.contents: readonly; write is deferred to the release-creation step in T012.Rollout
vX.Y.Zmatching the workspace version inCargo.toml; mismatches fail the job and stop further steps.Written for commit 4d2c1ec. Summary will update on new commits.