From 1b641d0c2481c052bc69610196a525a130d38d19 Mon Sep 17 00:00:00 2001 From: shenlebantongying Date: Sun, 7 Jul 2024 12:44:09 -0400 Subject: [PATCH] 2 --- .github/workflows/release-windows-vcpkg-cmake.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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'