Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ jobs:
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
MERGE_BRANCH=$(echo "$COMMIT_MSG" | sed -n 's/^Merge pull request #[0-9]* from [^/]*\/\(.*\)$/\1/p' || echo "")
if echo "$MERGE_BRANCH" | grep -qE '^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-v'; then
# Accept both `YYYY-MM-DD_release-vX.Y.Z` (documented) and the
# common `YYYY-MM-DD_release-X.Y.Z` variant (missing `v`).
if echo "$MERGE_BRANCH" | grep -qE '^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-(v)?[0-9]'; then
echo "is_release=true" >> $GITHUB_OUTPUT
elif echo "$COMMIT_MSG" | grep -qE '^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-v'; then
elif echo "$COMMIT_MSG" | grep -qE '^[0-9]{4}-[0-9]{2}-[0-9]{2}_release-(v)?[0-9]'; then
echo "is_release=true" >> $GITHUB_OUTPUT
else
# A release-looking branch that does not match must not skip the
# publish silently (that is how v0.1.44 was lost on 2026-08-21).
if echo "$MERGE_BRANCH" | grep -qi 'release'; then
echo "::warning::Merge from release-looking branch '$MERGE_BRANCH' does not match the release pattern; publish skipped. Rename to YYYY-MM-DD_release-vX.Y.Z and re-merge."
fi
echo "is_release=false" >> $GITHUB_OUTPUT
fi

Expand Down
Loading