From e3962a1fc17337d4328cb761bec31913599ccbba Mon Sep 17 00:00:00 2001 From: Kilian von Pflugk Date: Fri, 27 Sep 2024 23:03:13 +0200 Subject: [PATCH] ci: remove old release if exits in test repo --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2893b5..54b2752 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,12 @@ jobs: - name: Create archive run: zip -j "intro-skipper-v${{ env.NEW_FILE_VERSION }}.zip" ConfusedPolarBear.Plugin.IntroSkipper/bin/Release/net8.0/ConfusedPolarBear.Plugin.IntroSkipper.dll - + + - name: Remove old release if exits + if: ${{ github.repository == 'intro-skipper/intro-skipper-test' }} + run: gh release delete "10.9/v${{ env.NEW_FILE_VERSION }}" --cleanup-tag --yes || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create new release with tag if: github.event_name != 'pull_request'