File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments