From ee6c4823d3433ec1c48f1e2668708db0d3c133f5 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 12 May 2025 10:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20build=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8275e0b2..a0d4b0b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,11 +56,23 @@ jobs: cache-from: type=gha, scope=${{ github.workflow }}-docker cache-to: type=gha, scope=${{ github.workflow }}-docker + - name: Get existing release body + id: get_release_body + continue-on-error: true + run: | + release_body=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ env.app_version }}" | \ + jq -r '.body // ""') + echo "RELEASE_BODY<> $GITHUB_ENV + echo "$release_body" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + - name: Delete Release uses: dev-drprasad/delete-tag-and-release@v1.1 with: tag_name: ${{ env.app_version }} delete_release: true + delete_tag: true github_token: ${{ secrets.GITHUB_TOKEN }} - name: Generate Release @@ -68,6 +80,7 @@ jobs: with: tag_name: v${{ env.app_version }} name: v${{ env.app_version }} + body: ${{ env.RELEASE_BODY }} draft: false prerelease: false make_latest: false