Skip to content

fix(#278): harden release workflow — safe sync-main + blocking deps#279

Merged
ajianaz merged 1 commit into
developfrom
fix/release-workflow-hardening
Jun 14, 2026
Merged

fix(#278): harden release workflow — safe sync-main + blocking deps#279
ajianaz merged 1 commit into
developfrom
fix/release-workflow-hardening

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #278

Changes

sync-main (rewritten)

  • Safe fast-forward: git fetch origin main + merge-base --is-ancestor check before push
  • Abort on diverge: if main is NOT an ancestor of tag commit, exits with error instead of blind git push --force
  • Checkout tag commit directly (removed ref: develop)

publish-crates

  • needs: []needs: [sync-main] — crates.io publish now waits for main sync

actions/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: true
  • allow_force_pushes: true (release workflow)
  • allow_deletions: false

Root 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

- 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.
@ajianaz
ajianaz merged commit 9b0cc7b into develop Jun 14, 2026
10 checks passed
@ajianaz
ajianaz deleted the fix/release-workflow-hardening branch June 14, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: release workflow has same trapfall as uteke #325 — sync-main blind force-push + unprotected main

1 participant