Skip to content

Commit f25f13e

Browse files
authored
fix Release
1 parent 4101618 commit f25f13e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/github-release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: |
2121
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
2222
23-
# Extract exactly the section for YESTERDAY
23+
# Extract only the section for yesterday
2424
awk -v date="## $YESTERDAY" '
2525
$0 ~ date {found=1; print; next}
2626
found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit}
@@ -32,5 +32,16 @@ jobs:
3232
exit 0
3333
fi
3434
35+
CHANGELOG_SIZE=$(wc -c < changelog_tmp.md)
36+
echo "Changelog size: $CHANGELOG_SIZE bytes"
37+
38+
# Crop to first 20,000 characters if too large
39+
MAX_SIZE=20000
40+
if [ "$CHANGELOG_SIZE" -gt "$MAX_SIZE" ]; then
41+
echo "WARNING: Changelog too large, cropping to first $MAX_SIZE characters..."
42+
head -c "$MAX_SIZE" changelog_tmp.md > changelog_cropped.md
43+
mv changelog_cropped.md changelog_tmp.md
44+
fi
45+
3546
echo "Creating GitHub release for $YESTERDAY..."
3647
gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md

0 commit comments

Comments
 (0)