fix(#278): harden release workflow — safe sync-main + blocking deps#279
Merged
Conversation
- sync-main: safe fast-forward with merge-base --is-ancestor check. Aborts if main diverged instead of blind git push --force. - publish-crates: needs: [sync-main] (was needs:[] — independent of sync). - build-release: needs: sync-main (unchanged, already correct). - actions/checkout@v4 → @v6 (outdated). Same hardening pattern as uteke PR #326.
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.
Closes #278
Changes
sync-main (rewritten)
git fetch origin main+merge-base --is-ancestorcheck before pushgit push --forceref: develop)publish-crates
needs: []→needs: [sync-main]— crates.io publish now waits for main syncactions/checkout
@v4→@v6(matches uteke)Branch protection (post-merge)
After this PR merges, add main branch protection:
required_pull_request_reviews: 0(PR required)required_linear_history: trueallow_force_pushes: true(release workflow)allow_deletions: falseRoot cause pattern
Same as uteke #325: blind force-push + non-blocking deps allowed release to proceed while main stayed stale.
Tests
cargo test✅cargo clippy -- -D warnings✅