From 65ba9fee860ebad1393788b3291c61b2cb68e70c Mon Sep 17 00:00:00 2001 From: vikingnope <81376423+vikingnope@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:22:27 +0200 Subject: [PATCH] chore: Enhanced nightly release description (#395) --- .github/workflows/build.yml | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37b5356..31993e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -505,31 +505,37 @@ jobs: if: needs.fetch-info.outputs.build_type == 'nightly' id: changelog run: | - # Get the latest release tag - LATEST_RELEASE=$(gh release list --limit 1 --exclude-drafts --json tagName --jq '.[0].tagName' || echo "") + # Get the latest stable release tag for comparison + 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 - 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 + # Create new changelog with comparison link 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. **⚠️ 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 ---