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