Skip to content

Commit 47f34f7

Browse files
committed
chore(ci): make tag step idempotent
1 parent 29980a8 commit 47f34f7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,5 +189,10 @@ jobs:
189189
run: |
190190
git config user.email "info@platform.uno"
191191
git config user.name "Uno DevOps"
192-
git tag $env:NBGV_SemVer2
193-
git push origin $env:NBGV_SemVer2
192+
git rev-parse --verify "refs/tags/$env:NBGV_SemVer2" 2>$null
193+
if ($LASTEXITCODE -eq 0) {
194+
Write-Host "Tag $env:NBGV_SemVer2 already exists, skipping."
195+
} else {
196+
git tag $env:NBGV_SemVer2
197+
git push origin $env:NBGV_SemVer2
198+
}

0 commit comments

Comments
 (0)