From a232064a4a00554c26e7e92c7afba73a01a0a830 Mon Sep 17 00:00:00 2001 From: "d.o." <6849456+d-oit@users.noreply.github.com> Date: Wed, 22 Oct 2025 05:26:30 +0000 Subject: [PATCH] Update release workflow to extract only current version's changelog section and add commit summary --- .github/workflows/release-consolidated.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-consolidated.yml b/.github/workflows/release-consolidated.yml index da5a614..7231cb3 100644 --- a/.github/workflows/release-consolidated.yml +++ b/.github/workflows/release-consolidated.yml @@ -69,12 +69,20 @@ jobs: run: | TAG="${{ steps.tag.outputs.tag }}" - # Generate changelog for current tag - git cliff --tag $TAG > base_notes.md - + # Generate changelog for current tag and extract only current version section + TAG_NO_V=$(echo $TAG | sed 's/^v//') + git cliff --tag $TAG | awk "/^## \\[$TAG_NO_V\\]/ { found=1; print; next } /^##/ && found { exit } found { print }" > base_notes.md + # Remove the version header line to match original format sed -i '1d' base_notes.md + # Get previous tag and commit summary + PREV_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") + if [ -n "$PREV_TAG" ]; then + COMMIT_SUMMARY=$(git log --oneline $PREV_TAG..$TAG) + else + COMMIT_SUMMARY="Initial release - no previous commits to summarize." + fi # Create enhanced release notes cat > enhanced_notes.md << EOF @@ -82,6 +90,10 @@ jobs: $(cat base_notes.md) + ### 📝 Commit Summary + + $COMMIT_SUMMARY + ### 📦 Installation #### Download Binary