github: fix the tagname check

This commit is contained in:
Xiao Yi Fang 2024-07-12 16:17:28 +08:00
parent b795818540
commit 42909320ac

View file

@ -159,7 +159,7 @@ jobs:
${{steps.build_changelog.outputs.changelog}}
'@
$tagExist = gh api --silent "repos/:owner/:repo/git/refs/tags/${{github.ref_name}}"
$tagExist = gh api --silent "repos/:owner/:repo/git/refs/tags/${tagName}"
if (-not $?) {
if ($env:prerelease -eq "true") {
gh release create ${tagName} --target ${{github.ref_name}} --notes-file=./change_note.txt --latest=false --prerelease