From bce4868896c9fbfa47421f358786545bdd28f2b7 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 17 Jul 2024 00:43:58 -0500 Subject: [PATCH] Update pre-release.yaml --- .github/workflows/pre-release.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 523c2af4..2e339826 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -23,8 +23,18 @@ jobs: run: | $version = (Get-Date -Format "yy-MM-dd") echo "version=$version" >> $env:GITHUB_ENV - git tag $version - git push origin $version + shell: pwsh + + - name: Create Tag + id: create_tag + run: | + $tagExists = git tag -l $env:VERSION + if ($tagExists) { + Write-Host "Tag $env:VERSION already exists, skipping tag creation" + } else { + git tag $env:VERSION + git push origin $env:VERSION + } shell: pwsh - name: Create and Upload Release