Skip to content

release.yml: accept GitHub squash-merge (#N) suffix in detect regex#19

Merged
joaoh82 merged 1 commit intomainfrom
fix/release-detect-squash-suffix
Apr 23, 2026
Merged

release.yml: accept GitHub squash-merge (#N) suffix in detect regex#19
joaoh82 merged 1 commit intomainfrom
fix/release-detect-squash-suffix

Conversation

@joaoh82
Copy link
Copy Markdown
Owner

@joaoh82 joaoh82 commented Apr 23, 2026

Why

GitHub's default squash-merge title is <PR title> (#N). So when a Release PR titled release: v0.1.2 gets squash-merged, the commit on main is release: v0.1.2 (#18). The old anchored regex ($ at the end) rejected that, and the workflow silently no-op'd.

That just happened on the v0.1.2 canary — had to kick release.yml via workflow_dispatch as a manual workaround. This fixes it so future canaries detect + publish automatically.

What changes

  • .github/workflows/release.yml: strip trailing (#N) from the commit subject before the regex test.

Editing the squash-merge title to drop the suffix still works; it just isn't required anymore.

Test plan

  • Verified against both forms locally:
    echo 'release: v0.1.2' | sed -E 's/ \(#[0-9]+\)$//' # → 'release: v0.1.2'
    echo 'release: v0.1.2 (#18)' | sed -E 's/ \(#[0-9]+\)$//' # → 'release: v0.1.2'
    
  • CI passes on this PR
  • Next canary (v0.1.3+) merges cleanly with no manual dispatch

🤖 Generated with Claude Code

GitHub's default squash-merge title is `<PR title> (#N)` — so
merging a Release PR titled `release: v0.1.2` lands on main as
`release: v0.1.2 (#18)`, which the old anchored regex rejected.
The v0.1.2 canary had to be kicked via workflow_dispatch as a
result.

Strip the trailing ` (#N)` before the regex test so both forms
match. Editing the title to drop the suffix still works; it just
isn't required anymore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joaoh82 joaoh82 merged commit 900012a into main Apr 23, 2026
15 checks passed
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