Skip to content

fix(ci): remove sync-main — correct GitFlow (develop→main→tag) - #328

Merged
ajianaz merged 1 commit into
developfrom
fix/remove-sync-main
Jun 14, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/remove-sync-main

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

sync-main was a workaround that caused #325. Correct GitFlow:

  1. Default branch = develop — all work via PR to develop
  2. Release: PR develop → main (merge to main first)
  3. Tag vX.Y.Z from main commit
  4. Release workflow builds/publishes from tag

Changes

  • Removed sync-main job entirely
  • Added verify-main job: checks tag commit is reachable from origin/main. Aborts release if not.
  • build-release and publish-crates now needs: [verify-main]
  • Added PREREQUISITE comment at top of workflow

Comment thread .github/workflows/release.yml Fixed
@github-actions

github-actions Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

❌ Blocked — critical issues found.

🔴 Error (1)

  • .github/workflows/release.yml:33 — The workflow computes TAG_SHA with git rev-parse "${{ github.ref }}^{commit}". In a tag push workflow, ${{ github.ref }} is the full ref name like refs/tags/v1.2.3, but actions/checkout does not guarantee that this exact local ref exists after checkout. On annotated tag pushes, the checked-out repo may only have FETCH_HEAD/detached HEAD and the tag object itself, causing git rev-parse refs/tags/...^{commit} to fail even though the release is valid.

Review powered by cora-cli · BYOK · MIT

GitFlow: develop (default) → PR → main → tag → release.
sync-main was a workaround that caused #325. The correct flow is:
1. Merge develop → main via PR (before tagging)
2. Push tag vX.Y.Z from main commit
3. Release workflow builds and publishes from tag

No more automated main sync in release workflow.
@ajianaz
ajianaz force-pushed the fix/remove-sync-main branch from 3331fa0 to 4ce3d2d Compare June 14, 2026 02:58
git push origin "$TAG_SHA:refs/heads/main"
echo "✅ main fast-forwarded to $TAG_SHA"
MAIN_SHA=$(git rev-parse origin/main)
echo "Tag: $TAG_SHA"
@ajianaz
ajianaz merged commit 1910a4c into develop Jun 14, 2026
8 of 9 checks passed
@ajianaz
ajianaz deleted the fix/remove-sync-main branch June 14, 2026 03:21
ajianaz added a commit that referenced this pull request Aug 13, 2026
GitFlow: develop (default) → PR → main → tag → release.
sync-main was a workaround that caused #325. The correct flow is:
1. Merge develop → main via PR (before tagging)
2. Push tag vX.Y.Z from main commit
3. Release workflow builds and publishes from tag

No more automated main sync in release workflow.
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.

2 participants