Skip to content

feat: auto merge-to-main, bump-version workflow, and branch locking#154

Merged
petesramek merged 2 commits intodevelop/1.0from
copilot/propose-api-management-solution
Apr 3, 2026
Merged

feat: auto merge-to-main, bump-version workflow, and branch locking#154
petesramek merged 2 commits intodevelop/1.0from
copilot/propose-api-management-solution

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 3, 2026

The release-to-main promotion was manual and error-prone, with no way to determine which release/** branch is "latest" without scanning all of them. Additionally, there was no automated way to start a new major/minor version cycle or enforce push restrictions on protected branches.

merge-to-main (automatic)

  • Added merge-to-main job to release.yml, runs only on release/** after GitHub Release is created
  • Finds the highest release/** branch via git ls-remote | sort -V | tail -1
  • Normalizes both versions to M.m before comparing — only the latest branch triggers a PR to main
  • Skips silently with a step summary note if not the latest (e.g. hotfix on an older branch)

bump-version workflow

  • New workflow_dispatch workflow (bump-type: minor | major), must run from main
  • Auto-detects current version from highest release/** branch; calculates next M.m
  • Creates develop/M.m from main
  • Major bump: resets all PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt to #nullable enable — fresh API surface for breaking-change cycles
  • Minor bump: preserves API files — existing shipped API remains the baseline

Branch locking

  • New composite actions: branch-protection/lock (sets PR-required + no force-push + no deletions via GitHub API) and branch-protection/unlock (removes protection)
  • promote-branch.yml now locks newly created preview/** and release/** branches immediately after the initial push
  • Added administration: write permission to promote-branch.yml

promote-branch source-branch enforcement

  • Previously, any develop/** or support/** branch could be promoted directly to release/**
  • Now validates per promotion type: previewdevelop/**/support/**; releasepreview/** only

Copilot AI and others added 2 commits April 3, 2026 18:18
…ource-branch validation

Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/4418acb6-8233-47f4-9b0f-9f6f4de0fb09

Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
…kout to validate job, combine find commands, improve lock action error handling

Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/4418acb6-8233-47f4-9b0f-9f6f4de0fb09

Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
@petesramek petesramek marked this pull request as ready for review April 3, 2026 18:21
@petesramek petesramek merged commit 6e0a0c7 into develop/1.0 Apr 3, 2026
1 of 2 checks passed
Copilot AI requested a review from petesramek April 3, 2026 18:23
Copilot stopped work on behalf of petesramek due to an error April 3, 2026 18:23
Copilot stopped work on behalf of petesramek due to an error April 3, 2026 18:23
@petesramek petesramek deleted the copilot/propose-api-management-solution branch April 3, 2026 21:16
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