1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

Update github-release.yml

This commit is contained in:
CanbiZ 2025-03-01 10:34:55 +01:00 committed by GitHub
parent f1cdfecaaf
commit 00794c41e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,13 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d)
awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md > changelog_tmp.md
# Extract entries for only yesterday
awk -v date="## $YESTERDAY" '
$0 ~ date {found=1; next}
found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {found=0}
found {print}
' CHANGELOG.md > changelog_tmp.md
if [ ! -s changelog_tmp.md ]; then
echo "No changes found for $YESTERDAY, skipping release."
@ -29,7 +35,6 @@ jobs:
CHANGELOG_SIZE=$(wc -c < changelog_tmp.md)
echo "Changelog size: $CHANGELOG_SIZE bytes"
# Crop to last 10,000 bytes if too large
if [ "$CHANGELOG_SIZE" -gt 10000 ]; then
echo "WARNING: Changelog too large, cropping to last 10,000 bytes..."
tail -c 10000 changelog_tmp.md > changelog_cropped.md