From 04047d9afe648a19480452547f14dabf1feedae2 Mon Sep 17 00:00:00 2001 From: Ducca <64695363+duccas@users.noreply.github.com> Date: Fri, 20 Oct 2023 17:56:06 +0300 Subject: [PATCH] fix --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6fc032..071f121 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,22 @@ jobs: - name: Authenticate with GitHub CLI run: echo "${{ secrets.GIT_TOKEN }}" | gh auth login --with-token + - name: Check if tag exists + id: check_tag + continue-on-error: true + run: | + if gh release view ${{ steps.get_info.outputs.version }}; then + echo "Tag already exists" + else + echo "::set-output name=tag_exists::false" + fi + + - name: Create new tag if it doesn't exist + if: steps.check_tag.outputs.tag_exists != 'false' + run: | + git tag ${{ steps.get_info.outputs.version }} + git push origin ${{ steps.get_info.outputs.version }} + - name: Create GitHub Release run: | gh release create ${{ steps.get_info.outputs.version }} \