mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-15 20:20:09 +00:00
fix(ci): strip ANSI codes before detecting published release
semantic-release outputs ANSI color codes that break the grep pattern for detecting "Published GitHub release", causing Discord notifications to be skipped even on successful releases.
This commit is contained in:
@@ -59,7 +59,9 @@ jobs:
|
||||
run: |
|
||||
OUTPUT=$(bunx semantic-release 2>&1) || true
|
||||
echo "$OUTPUT"
|
||||
if echo "$OUTPUT" | grep -q "Published release"; then
|
||||
# Strip ANSI color codes before matching (semantic-release outputs colored text)
|
||||
CLEAN=$(echo "$OUTPUT" | sed 's/\x1b\[[0-9;]*m//g')
|
||||
if echo "$CLEAN" | grep -q "Published GitHub release"; then
|
||||
echo "released=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "released=false" >> $GITHUB_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user