From b67ec35cbbef07b3b0363302804787b1b792c6b5 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 00:12:00 -0500 Subject: [PATCH] Update pre-release.yaml --- .github/workflows/pre-release.yaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index d6bf6912..b625011a 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -74,16 +74,35 @@ jobs: name: winutil path: ./winutil.ps1 + - name: Generate Release Notes + id: generate_notes + uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + config-name: release-drafter.yml + version: ${{ env.version }} + + - name: Prepare Release Body + id: prepare_body + run: | + new_changes="${{ steps.generate_notes.outputs.body }}" + echo "body<> $GITHUB_OUTPUT + echo "$new_changes" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + - name: Create and Upload Release id: create_release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ env.VERSION }} - name: Pre-Release ${{ env.VERSION }} - body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)" + tag_name: ${{ env.version }} + name: Pre-Release ${{ env.version }} + body: | + ${{ steps.prepare_body.outputs.body }} + + ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1) append_body: false files: ./winutil.ps1 prerelease: true - generate_release_notes: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}