diff --git a/.github/workflows/release-windows-vcpkg-cmake.yml b/.github/workflows/release-windows-vcpkg-cmake.yml index cee5610bc..036784adc 100644 --- a/.github/workflows/release-windows-vcpkg-cmake.yml +++ b/.github/workflows/release-windows-vcpkg-cmake.yml @@ -170,10 +170,13 @@ jobs: ${{steps.build_changelog.outputs.changelog}} " - $tagExist = gh api --silent "repos/:owner/:repo/git/refs/tags/${{github.ref_name}}" - if ($tagExist -neq $null){ - gh release create ${tagName} --target ${{github.ref_name}} --notes "${changeNotes}" + if (-not $?) { + if ($env:prerelease -eq "true") { + gh release create ${tagName} --target ${{github.ref_name}} --notes "${changeNotes}" --latest=false + } else { + gh release create ${tagName} --target ${{github.ref_name}} --notes "${changeNotes}" --latest=true + } } cd './build_dir'