Repository navigation
feat(ci): add candidate release mode and PR-based dev sync - #220
Merged
Merged
Conversation
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
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.
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 nextX.Y.Z-rcNtag automatically, andrelease-kind=finalfor the actual release. Post-release sync is replaced by a PR-basedsync-main-to-devworkflow 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 deprecatedAPP_SYNC_ISSUES_*secrets to dedicatedRELEASE_APP_*andCOMMIT_APP_*identities.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.github/workflows/release.yml— Addrelease-kindinput (candidate/final), computeX.Y.Z-rcNpublish 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 replacingpost-release.yml; opens a PR from a disposablechore/sync-main-to-dev-*branch, detects conflicts and labelsmerge-conflict, enables auto-merge, cleans stale sync branches.github/workflows/post-release.yml— Deleted (replaced bysync-main-to-dev.yml).github/workflows/sync-issues.yml— Migrate token secrets toCOMMIT_APP_*assets/workspace/.github/workflows/sync-issues.yml— Mirror token migrationpackages/vig-utils/src/vig_utils/prepare_changelog.py— Anchor regex to line starts (re.MULTILINE) to prevent inline##markers from truncating extractionpackages/vig-utils/tests/test_prepare_changelog.py— Add test case for inline##markersdocs/RELEASE_CYCLE.md— Rewrite release flow diagram and phase descriptions for candidate/final model, document app permission modeljustfile— Addpublish-candidaterecipe, updatefinalize-releaseto passrelease-kind=finalCHANGELOG.md— Document all changes under UnreleasedCONTRIBUTE.md,docs/templates/CONTRIBUTE.md.j2— Update release instructionsREADME.md— Add sync-main-to-dev badge.cur*or/rules/changelog.mdc,assets/workspace/.cur*or/rules/changelog.mdc— Minor rule updatesChangelog Entry
Added
release.ymlnow supportsrelease-kind=candidate(default) and infers the next availableX.Y.Z-rcNtag automaticallyrelease-kind=finaland are exposed byjust finalize-releasesync-main-to-dev.ymlreplacespost-release.yml— syncs main into dev via PR instead of direct push, satisfying branch protection rulesmerge-conflictwith resolution instructionsChanged
prepare-release.ymlnow freezes CHANGELOG on dev (Unreleased → [X.Y.Z] - TBD + fresh empty Unreleased), then forks release branch and strips the empty Unreleased section## Unreleased; both branches share the [X.Y.Z] section for clean mergesAPP_SYNC_ISSUES_*secrets withRELEASE_APP_*for release and preparation workflowssync-issues.ymlnow usesCOMMIT_APP_*;sync-main-to-dev.ymluses both apps (commit app for refs, release app for PR operations)sync-issuestrigger fromsync-main-to-dev.ymland documented the app permission model indocs/RELEASE_CYCLE.mdRemoved
post-release.yml— replaced bysync-main-to-dev.yml(#172)Fixed
##markers (#172)extract_unreleased_contentregex used mid-line lookahead for##/###which treated inline hash markers (e.g.`##`in backticks) as heading boundariesre.MULTILINEso only actual heading lines terminate section captureTesting
just test)Manual Testing Details
N/A
Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)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-devworkflow uses two separate GitHub App identities (commit app for ref operations, release app for PR/label operations) to follow least-privilege principles.Refs: #172