From 1a31bb0bdd313fbdb72e599a21ee43d32d88b009 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Thu, 26 Sep 2024 16:28:50 +0200 Subject: [PATCH] Update and use tag-exists-action --- .github/workflows/release.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05c7d6fbb..3ba30d5bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: EXISTING_RELEASE: ${{ steps.release_flag.outputs.result }} steps: - name: Check for existing release tag - uses: mukunku/tag-exists-action@v1.3.0 + uses: mukunku/tag-exists-action@v1.6.0 id: check_tag with: tag: ${{ needs.get_version.outputs.ARK_VERSION }} @@ -184,17 +184,19 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 + - name: Check for existing release tag + uses: mukunku/tag-exists-action@v1.6.0 + id: check_tag + with: + tag: ${{ needs.get_version.outputs.ARK_VERSION }} + - name: Delete failed release if any + if: steps.check-tag.outputs.exists == 'true' env: GH_TOKEN: ${{ github.token }} run: | TAG=${{ needs.get_version.outputs.ARK_VERSION }} - if gh release view $TAG > /dev/null 2>&1; then - echo "Cleaning up release $TAG" - gh release delete $TAG -y --cleanup-tag - else - echo "No release to clean up" - fi + gh release delete $TAG -y --cleanup-tag # Keep this at the very end of the workflow tree and without any other # steps to ensure we get a Slack report when something failed