@@ -333,17 +333,27 @@ jobs:
333
333
- name : Format Release Notes
334
334
id : format_notes
335
335
run : |
336
- echo "**🚀 Features**" > formatted_notes.txt
337
- echo "$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\sfeat' | head -n 5 || echo 'None')" >> formatted_notes.txt
338
- echo "" >> formatted_notes.txt
339
-
340
- echo "**🐛 Fixes**" >> formatted_notes.txt
341
- echo "$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\sfix' | head -n 5 || echo 'None')" >> formatted_notes.txt
342
- echo "" >> formatted_notes.txt
336
+
337
+ features=$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\sfeat' | head -n 5)
338
+ if [[ -n "$features" ]]; then
339
+ echo "**🚀 Features**" > formatted_notes.txt
340
+ echo "$features" >> formatted_notes.txt
341
+ echo "" >> formatted_notes.txt
342
+ fi
343
+
344
+ fixes=$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\s(fix|bug|improvement|patch)' | head -n 5)
345
+ if [[ -n "$fixes" ]]; then
346
+ echo "**🐛 Fixes**" >> formatted_notes.txt
347
+ echo "$fixes" >> formatted_notes.txt
348
+ echo "" >> formatted_notes.txt
349
+ fi
343
350
344
- echo "**🛠 Chores**" >> formatted_notes.txt
345
- echo "$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\schore' | head -n 5 || echo 'None')" >> formatted_notes.txt
346
- echo "" >> formatted_notes.txt
351
+ chores=$(echo "$RELEASE_NOTES" | grep -iE '^\*\s\[[a-f0-9]+\]\(.*\):\s(chore|docs|build|ci)' | head -n 5)
352
+ if [[ -n "$chores" ]]; then
353
+ echo "**🛠 Chores**" >> formatted_notes.txt
354
+ echo "$chores" >> formatted_notes.txt
355
+ echo "" >> formatted_notes.txt
356
+ fi
347
357
348
358
cat formatted_notes.txt
349
359
FORMATTED_NOTES=$(cat formatted_notes.txt)
@@ -355,6 +365,9 @@ jobs:
355
365
env :
356
366
DISCORD_WEBHOOK_URL : ${{ secrets.DISCORD_WEBHOOK_RELEASE_URL }}
357
367
run : |
368
+
369
+ FORMATTED_NOTES=$(echo "$FORMATTED_NOTES" | sed -E 's/\): [^:]+:/) :/g')
370
+
358
371
default_color="#1ac4c5"
359
372
hex_to_decimal() { printf '%d' "0x${1#"#"}"; }
360
373
embed_color=$(hex_to_decimal "$default_color")
0 commit comments