From f88130fc4522cccb81a63fd894fbec9742f4077c Mon Sep 17 00:00:00 2001 From: sinspired Date: Wed, 16 Oct 2024 20:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 99dea59..78ff84e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -105,13 +105,17 @@ jobs: echo "commit_message=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT shell: bash - - name: Delete existing release - uses: dev-drprasad/delete-tag-and-release@v0.2.1 - with: - tag_name: ${{ github.ref_name }} - delete_release: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Delete existing release if exists + run: | + RELEASE_ID=$(gh release view ${{ github.ref_name }} --json id --jq '.id' || echo "") + if [ -n "$RELEASE_ID" ]; then + gh release delete ${{ github.ref_name }} --yes + echo "Release deleted: ${{ github.ref_name }}" + else + echo "No existing release found for: ${{ github.ref_name }}" + fi + shell: bash + - name: List Files run: ls -R ./