From 5a89ec467017a06c742196cdb613274e9edaa5cf Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 00:07:29 -0500 Subject: [PATCH] Update pre-release.yaml --- .github/workflows/pre-release.yaml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 073f30ea..f0733e27 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -25,17 +25,6 @@ jobs: echo "version=$version" >> $GITHUB_ENV shell: bash - - name: Get Latest Release - id: get_latest_release - uses: octokit/request-action@v2.x - with: - route: GET /repos/{owner}/{repo}/releases/latest - owner: ${{ github.repository_owner }} - repo: ${{ github.event.repository.name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - - name: Generate Release Notes id: generate_notes uses: release-drafter/release-drafter@v5 @@ -48,20 +37,10 @@ jobs: - name: Prepare Release Body id: prepare_body run: | - latest_release_body="${{ fromJson(steps.get_latest_release.outputs.data).body }}" new_changes="${{ steps.generate_notes.outputs.body }}" - if [[ -z "$latest_release_body" ]]; then - echo "body<> $GITHUB_OUTPUT - echo "$new_changes" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - else - echo "body<> $GITHUB_OUTPUT - echo "$new_changes" >> $GITHUB_OUTPUT - echo "" >> $GITHUB_OUTPUT - echo "Previous Release Notes:" >> $GITHUB_OUTPUT - echo "$latest_release_body" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - fi + echo "body<> $GITHUB_OUTPUT + echo "$new_changes" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: Create and Upload Release id: create_release