From ccc4409adcc6498b00343cd70a29af1da1b1d979 Mon Sep 17 00:00:00 2001 From: Jacek Pudysz Date: Mon, 13 Oct 2025 11:33:31 +0200 Subject: [PATCH] refactor: improve release notes generation by writing directly to file instead of using variables --- .github/workflows/release.yaml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f56b671a..489fb785 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -97,22 +97,21 @@ jobs: VERSION="${{ steps.package_version.outputs.version }}" PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") + # Generate release notes file + echo "## What's Changed" > release_notes.txt + echo "" >> release_notes.txt + if [ -z "$PREV_TAG" ]; then echo "No previous tag found, using all commits" - COMMITS=$(git log --pretty=format:"- %s (%h)" --no-merges) + git log --pretty=format:"- %s (%h)" --no-merges >> release_notes.txt else echo "Generating changelog from $PREV_TAG to HEAD" - COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"- %s (%h)" --no-merges) + git log $PREV_TAG..HEAD --pretty=format:"- %s (%h)" --no-merges >> release_notes.txt fi - NOTES="## What's Changed - -$COMMITS - -**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...v${VERSION}" + echo "" >> release_notes.txt + echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...v${VERSION}" >> release_notes.txt - # Save to file for multiline handling - echo "$NOTES" > release_notes.txt echo "notes_file=release_notes.txt" >> $GITHUB_OUTPUT - name: Commit version bump (if version was updated)