chore: Enhanced nightly release description (#395)

This commit is contained in:
vikingnope 2025-06-18 18:22:27 +02:00 committed by GitHub
parent 7914447b09
commit 65ba9fee86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -505,31 +505,37 @@ jobs:
if: needs.fetch-info.outputs.build_type == 'nightly' if: needs.fetch-info.outputs.build_type == 'nightly'
id: changelog id: changelog
run: | run: |
# Get the latest release tag # Get the latest stable release tag for comparison
LATEST_RELEASE=$(gh release list --limit 1 --exclude-drafts --json tagName --jq '.[0].tagName' || echo "") LATEST_STABLE_RELEASE=$(gh release list --limit 50 --exclude-drafts --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == false) | .tagName' | head -1 || echo "")
if [ -z "$LATEST_RELEASE" ]; then # Create new changelog with comparison link
echo "No previous releases found, generating changelog from initial commit"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
else
echo "Generating changelog from $LATEST_RELEASE to HEAD"
CHANGELOG=$(git log ${LATEST_RELEASE}..HEAD --pretty=format:"- %s (%h)" --no-merges)
fi
if [ -z "$CHANGELOG" ]; then
CHANGELOG="- No changes since last release"
fi
# Create changelog with proper formatting
cat > changelog.md <<-EOF cat > changelog.md <<-EOF
# 🌙 Nightly Build - $(date -u "+%Y-%m-%d %H:%M:%S UTC") # $(date -u "+%Y-%m-%d %H:%M:%S UTC")
This is an automated nightly build containing the latest changes from the develop branch. This is an automated nightly build containing the latest changes from the develop branch.
**⚠️ Warning:** This is a development build and may contain bugs or incomplete features. **⚠️ Warning:** This is a development build and may contain bugs or incomplete features.
EOF
## 📋 Changes since last release: # Add comparison link if we have a latest stable release
if [ -n "$LATEST_STABLE_RELEASE" ]; then
cat >> changelog.md <<-EOF
$CHANGELOG ## 📋 What's Changed
See all changes since the latest release: [Compare $LATEST_STABLE_RELEASE...HEAD](https://github.com/${{ github.repository }}/compare/$LATEST_STABLE_RELEASE...HEAD)
EOF
else
cat >> changelog.md <<-EOF
## 📋 What's Changed
See all changes: [View commits](https://github.com/${{ github.repository }}/commits/develop)
EOF
fi
# Add build metadata
cat >> changelog.md <<-EOF
--- ---