CI: Fix tag conflicts

This commit is contained in:
Margen67 2022-02-28 06:54:53 -08:00 committed by Gliniak
parent 1e58ab9f7d
commit 808c05a818
1 changed files with 4 additions and 2 deletions

View File

@ -81,6 +81,8 @@ jobs:
$branch=$($env:GITHUB_REF -replace 'refs/heads/', '')
$title="${tag}_$branch"
gh release create $tag $asset --target $env:GITHUB_SHA -t $title
gh release delete $branch -y
# Remove canary_ to prevent conflicts from tag
$tag=$($branch -replace 'canary_', '')
gh release delete $tag -y
If ($LastExitCode -ne 0) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
gh release create $branch $asset --target $env:GITHUB_SHA -t $branch
gh release create $tag $asset --target $env:GITHUB_SHA -t $branch