From 0832c5c07112622051894a84f447ee296284d3aa Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sun, 9 Nov 2025 16:33:46 +0000 Subject: [PATCH] feat(release): add dynamic release title generation Release titles now automatically reflect the type of changes: - 'vX.Y.Z - New Features & Bug Fixes' (both present) - 'vX.Y.Z - New Features' (only features) - 'vX.Y.Z - Bug Fixes' (only fixes) - 'vX.Y.Z' (fallback for other changes) Determined by analyzing commit messages between previous tag and current tag. Impact: Release titles are more descriptive and immediately show what changed, making it easier for users to understand the release at a glance. --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c63cfe0..662b1c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,9 +218,34 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "${{ steps.version_check.outputs.warning }}" >> $GITHUB_STEP_SUMMARY + - name: Generate release title + id: release_title + run: | + TAG_VERSION="${GITHUB_REF#refs/tags/}" + FROM_TAG="${{ steps.previoustag.outputs.previous_tag }}" + + # Extract main feature types from commits + FEAT_COUNT=$(git log ${FROM_TAG}..HEAD --format="%s" --no-merges | grep -cE "^feat(\(.+\))?:" || true) + FIX_COUNT=$(git log ${FROM_TAG}..HEAD --format="%s" --no-merges | grep -cE "^fix(\(.+\))?:" || true) + + # Build title based on what changed + if [ $FEAT_COUNT -gt 0 ] && [ $FIX_COUNT -gt 0 ]; then + TITLE="$TAG_VERSION - New Features & Bug Fixes" + elif [ $FEAT_COUNT -gt 0 ]; then + TITLE="$TAG_VERSION - New Features" + elif [ $FIX_COUNT -gt 0 ]; then + TITLE="$TAG_VERSION - Bug Fixes" + else + TITLE="$TAG_VERSION" + fi + + echo "title=$TITLE" >> $GITHUB_OUTPUT + echo "Release title: $TITLE" + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: + name: ${{ steps.release_title.outputs.title }} body: ${{ steps.release_notes.outputs.notes }} draft: false prerelease: false