Skip to content

feat(ci): add candidate release mode and PR-based dev sync - #220

Merged
c-vigo merged 5 commits into
devfrom
feature/172-rc-publishing-cleanup-release-workflow
Mar 4, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/172-rc-publishing-cleanup-release-workflow

Conversation

@c-vigo

@c-vigo c-vigo commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add release-candidate (RC) publishing to the release workflow and redesign the post-release sync and CHANGELOG flow. The release workflow now supports release-kind=candidate (default), which infers the next X.Y.Z-rcN tag automatically, and release-kind=final for the actual release. Post-release sync is replaced by a PR-based sync-main-to-dev workflow that satisfies branch-protection rules. The CHANGELOG lifecycle is redesigned so dev never loses ## Unreleased: preparation freezes the section on dev first, then forks the release branch. Workflow authentication is migrated from the deprecated APP_SYNC_ISSUES_* secrets to dedicated RELEASE_APP_* and COMMIT_APP_* identities.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • .github/workflows/release.yml — Add release-kind input (candidate/final), compute X.Y.Z-rcN publish version from existing tags, skip CHANGELOG changes for candidates, tag verification uses publish version
  • .github/workflows/prepare-release.yml — Freeze CHANGELOG on dev (Unreleased → [X.Y.Z] - TBD + fresh empty Unreleased), fork release branch from freeze commit, strip empty Unreleased from release branch
  • .github/workflows/sync-main-to-dev.yml — New workflow replacing post-release.yml; opens a PR from a disposable chore/sync-main-to-dev-* branch, detects conflicts and labels merge-conflict, enables auto-merge, cleans stale sync branches
  • .github/workflows/post-release.yml — Deleted (replaced by sync-main-to-dev.yml)
  • .github/workflows/sync-issues.yml — Migrate token secrets to COMMIT_APP_*
  • assets/workspace/.github/workflows/sync-issues.yml — Mirror token migration
  • packages/vig-utils/src/vig_utils/prepare_changelog.py — Anchor regex to line starts (re.MULTILINE) to prevent inline ## markers from truncating extraction
  • packages/vig-utils/tests/test_prepare_changelog.py — Add test case for inline ## markers
  • docs/RELEASE_CYCLE.md — Rewrite release flow diagram and phase descriptions for candidate/final model, document app permission model
  • justfile — Add publish-candidate recipe, update finalize-release to pass release-kind=final
  • CHANGELOG.md — Document all changes under Unreleased
  • CONTRIBUTE.md, docs/templates/CONTRIBUTE.md.j2 — Update release instructions
  • README.md — Add sync-main-to-dev badge
  • .cur*or/rules/changelog.mdc, assets/workspace/.cur*or/rules/changelog.mdc — Minor rule updates

Changelog Entry

Added

  • Candidate publishing mode in release workflow (#172)
    • release.yml now supports release-kind=candidate (default) and infers the next available X.Y.Z-rcN tag automatically
    • Candidate runs create and push Git tags, publish candidate manifests, and keep candidate tags after final release
    • Final runs remain available via release-kind=final and are exposed by just finalize-release
  • PR-based dev sync after release (#172)
    • sync-main-to-dev.yml replaces post-release.yml — syncs main into dev via PR instead of direct push, satisfying branch protection rules
    • Detects merge conflicts, labels merge-conflict with resolution instructions
    • Auto-merge enabled for conflict-free PRs; stale sync branches cleaned up automatically

Changed

  • Release CHANGELOG flow redesigned (#172)
    • prepare-release.yml now freezes CHANGELOG on dev (Unreleased → [X.Y.Z] - TBD + fresh empty Unreleased), then forks release branch and strips the empty Unreleased section
    • Dev never enters a state without ## Unreleased; both branches share the [X.Y.Z] section for clean merges
    • Candidate releases skip CHANGELOG changes; only final releases set the date
    • No CHANGELOG reset needed during post-release sync
  • Release automation now uses dedicated GitHub App identities (#172)
    • Replaced deprecated APP_SYNC_ISSUES_* secrets with RELEASE_APP_* for release and preparation workflows
    • sync-issues.yml now uses COMMIT_APP_*; sync-main-to-dev.yml uses both apps (commit app for refs, release app for PR operations)
    • Removed automatic sync-issues trigger from sync-main-to-dev.yml and documented the app permission model in docs/RELEASE_CYCLE.md

Removed

  • post-release.yml — replaced by sync-main-to-dev.yml (#172)

Fixed

  • CHANGELOG extraction truncated on inline ## markers (#172)
    • extract_unreleased_content regex used mid-line lookahead for ##/### which treated inline hash markers (e.g. `##` in backticks) as heading boundaries
    • Anchored regex to line starts with re.MULTILINE so only actual heading lines terminate section capture

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

This PR covers the scope originally planned as "sub-issue 3 of 4" for #169 (Phase 1), but expanded to include the CHANGELOG flow redesign and post-release sync replacement, which were tightly coupled to the candidate publishing feature.

The sync-main-to-dev workflow uses two separate GitHub App identities (commit app for ref operations, release app for PR/label operations) to follow least-privilege principles.

Refs: #172

c-vigo added 5 commits March 4, 2026 14:57
The extract_unreleased_content regex uses a mid-line lookahead for ##/###
which silently truncates entries containing inline hash markers in
backticks (e.g., `##`). This is the same bug found in
sync-issues-action #18.

Refs: #172
The extract_unreleased_content regex used a mid-line negative
lookahead (?!###|##) that treated inline hash markers (e.g. `##`
inside backticks) as heading boundaries, silently truncating content.

Anchor to line starts with ^### and ^## using re.MULTILINE so only
actual heading lines terminate section capture.

Refs: #172
…R-based sync

- prepare-release.yml: freeze CHANGELOG on dev (Unreleased → [X.Y.Z] -
  TBD + fresh empty Unreleased) in a single atomic commit, fork release
  branch from that commit, strip empty Unreleased on release branch.
  Dev never enters a state without ## Unreleased.

- release.yml: candidate releases skip CHANGELOG changes entirely;
  only final releases set the date and trigger sync-issues.

- sync-main-to-dev.yml: replaces post-release.yml. Opens a PR to merge
  main into dev instead of pushing directly (satisfies branch protection).
  Detects conflicts, labels merge-conflict with resolution instructions,
  enables auto-merge for conflict-free PRs, cleans up stale sync branches.

- No CHANGELOG reset needed during post-release sync because dev already
  has ## Unreleased from the prepare-release step.

- Updated changelog.mdc rule, RELEASE_CYCLE.md, CONTRIBUTE.md, justfile
  to reflect the new flow.

Refs: #172
@c-vigo c-vigo self-assigned this Mar 4, 2026
@c-vigo
c-vigo merged commit 0bbe81e into dev Mar 4, 2026
18 of 21 checks passed
@c-vigo
c-vigo deleted the feature/172-rc-publishing-cleanup-release-workflow branch March 4, 2026 20:52
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.

1 participant