From 7cf7bd4429c7156b36b3280cb7834fe96d469120 Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Sat, 5 Oct 2024 13:37:58 +0300 Subject: [PATCH] Update auto-tag.yaml --- .github/workflows/auto-tag.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/auto-tag.yaml b/.github/workflows/auto-tag.yaml index 047b695..d5e9979 100644 --- a/.github/workflows/auto-tag.yaml +++ b/.github/workflows/auto-tag.yaml @@ -19,7 +19,16 @@ jobs: VERSION=$(node -p "require('./package.json').version") echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: check if tag exists + id: check_tag + run: | + if git rev-parse "refs/tags/${{ env.VERSION }}" >/dev/null 2>&1; then + echo "Tag already exists" + exit 0 + fi + - name: create new tag + if: steps.check_tag.outputs.tag_exists != 'true' run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com"