Skip to content

Commit 5e79808

Browse files
committed
fix: release note issue for breaking changes commit
1 parent 01872fb commit 5e79808

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,13 @@ jobs:
111111
COMMITS=$(git log --pretty=format:"%s|%h" ${LATEST_TAG}..HEAD)
112112
fi
113113
114+
BREAKING=""
114115
while IFS='|' read -r msg hash; do
115-
if echo "$msg" | grep -qE "^feat(\(.+\))?:"; then
116+
# Check for breaking changes first (feat!, fix!, etc.)
117+
if echo "$msg" | grep -qE "^(feat|fix|refactor)(\(.+\))?!:"; then
118+
CLEAN_MSG=$(echo "$msg" | sed -E 's/^(feat|fix|refactor)(\([^)]+\))?!:\s*//')
119+
BREAKING="${BREAKING}- ${CLEAN_MSG} (${hash})\n"
120+
elif echo "$msg" | grep -qE "^feat(\(.+\))?:"; then
116121
CLEAN_MSG=$(echo "$msg" | sed -E 's/^feat(\([^)]+\))?:\s*//')
117122
FEATURES="${FEATURES}- ${CLEAN_MSG} (${hash})\n"
118123
elif echo "$msg" | grep -qE "^fix(\(.+\))?:"; then
@@ -125,6 +130,9 @@ jobs:
125130
done <<< "$COMMITS"
126131
127132
# Build release notes
133+
if [ -n "$BREAKING" ]; then
134+
NOTES="${NOTES}## ⚠️ Breaking Changes\n${BREAKING}\n"
135+
fi
128136
if [ -n "$FEATURES" ]; then
129137
NOTES="${NOTES}## Features\n${FEATURES}\n"
130138
fi

0 commit comments

Comments
 (0)