Repository navigation
Release workflow: respect protected master (no direct push) - #14
silverbucket wants to merge 1 commit into
Conversation
- Infer current version from latest GitHub release (Makefile fallback) - Publish release from master without committing there - Open a PR to sync Makefile after publish (auto-merge when enabled) Co-authored-by: Nick Jennings <silverbucket@users.noreply.github.com>
📝 WalkthroughWalkthroughThe Release GitHub Actions workflow is refactored to compute the next version from the latest published GitHub release tag and to synchronize the Makefile via an automated pull request instead of direct commits to master. The workflow gains ChangesRelease Workflow Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Security review complete: no medium, high, or critical vulnerabilities found in the changed release workflow or README instructions.
Validated controls: workflow_dispatch input is constrained to the bump choices, release-derived tag data is reduced to X.Y.Z before reaching shell, git, release, and PR sinks, and the job remains behind the release environment while avoiding direct pushes to protected master. No prior automation review threads were present to re-report.
Sent by Cursor Automation: Find vulnerabilities
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)
84-93:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftThe Makefile sync path is not retryable after a partial post-release failure.
Once the release is published, any transient failure in Lines 146-159 leaves
Makefileunsynced, and a rerun will stop at Lines 90-92 before it can recreate or finish the PR. That means the exact failure mode this PR is trying to automate still needs manual repair.A safer shape here is to make the sync phase independently rerunnable: either split it into a release-triggered follow-up workflow, or let the “release already exists” case continue into an idempotent PR reconciliation path instead of exiting immediately.
Also applies to: 134-159
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml around lines 84 - 93, The current "Check release does not exist" step exits when gh release view finds an existing TAG, which prevents rerunning the Makefile sync path after a partial post-release failure; change the workflow so that this step does NOT abort on an existing release but instead sets a flag (e.g., export RELEASE_EXISTS=true) or writes a status file and allows the job to continue into an idempotent PR-reconciliation/sync path, or alternatively move the Makefile sync steps into a separate release-triggered follow-up workflow that runs on published release events; update the logic around the gh release view invocation (and anywhere it currently exits on existence) to be non-fatal and to drive an idempotent sync routine for the Makefile.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/release.yml:
- Around line 84-93: The current "Check release does not exist" step exits when
gh release view finds an existing TAG, which prevents rerunning the Makefile
sync path after a partial post-release failure; change the workflow so that this
step does NOT abort on an existing release but instead sets a flag (e.g., export
RELEASE_EXISTS=true) or writes a status file and allows the job to continue into
an idempotent PR-reconciliation/sync path, or alternatively move the Makefile
sync steps into a separate release-triggered follow-up workflow that runs on
published release events; update the logic around the gh release view invocation
(and anywhere it currently exits on existence) to be non-fatal and to drive an
idempotent sync routine for the Makefile.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d6052b3e-ef79-48eb-9728-4cf6232ff4b6
📒 Files selected for processing (2)
.github/workflows/release.ymlREADME.md


Problem
Release failed pushing the Makefile bump directly to
master:testexpectedSolution
v1.3.0→1.3.0); Makefile only if no releases yetmaster(no push tomaster)chore/bump-version-X.Y.ZPR to sync the Makefile; enable auto-merge when the repo allows itAfter merge
Run Actions → Release with patch to publish v1.3.1 (from latest
v1.3.0). Merge the follow-up Makefile PR when it appears.Summary by CodeRabbit
Chores
Documentation