From e0da2acc1fe0afb7d726a8f63a25e616c36e16fe Mon Sep 17 00:00:00 2001 From: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Date: Tue, 23 Jun 2026 17:17:36 -0400 Subject: [PATCH] ci: honor breaking semver markers --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba1eddb61..906cc36d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,12 +80,22 @@ jobs: with: tool: cargo-semver-checks + - name: Determine semver release type + run: | + if git log --format=%B \ + ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} \ + | grep -Eq '(^[A-Za-z0-9_-]+(\([^)]*\))?!:|^BREAKING[ -]CHANGE:)'; then + echo "SEMVER_RELEASE_TYPE=major" >> "$GITHUB_ENV" + else + echo "SEMVER_RELEASE_TYPE=minor" >> "$GITHUB_ENV" + fi + - name: Check rmcp (default features) run: | cargo semver-checks \ --package rmcp \ --baseline-rev ${{ github.event.pull_request.base.sha }} \ - --release-type minor \ + --release-type "$SEMVER_RELEASE_TYPE" \ --only-explicit-features \ --features default @@ -98,7 +108,7 @@ jobs: cargo semver-checks \ --package rmcp \ --baseline-rev ${{ github.event.pull_request.base.sha }} \ - --release-type minor \ + --release-type "$SEMVER_RELEASE_TYPE" \ --only-explicit-features \ --features "$FEATURES"