Skip to content

Commit a85b063

Browse files
committed
fix: ci check release job
1 parent 6efb7d4 commit a85b063

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,15 @@ jobs:
145145
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146146
run: |
147147
$tagName = "v${{ env.VERSION }}"
148+
$ErrorActionPreference = "SilentlyContinue"
148149
149150
# Get release info for this tag (if exists)
150-
$release = gh release view $tagName --json isDraft,name 2>$null
151+
$release = gh release view $tagName --json isDraft,name 2>&1
152+
$exitCode = $LASTEXITCODE
151153
152-
if ($LASTEXITCODE -ne 0) {
154+
$ErrorActionPreference = "Stop"
155+
156+
if ($exitCode -ne 0) {
153157
Write-Host "No release exists for $tagName - will create draft release"
154158
echo "skip_release=false" >> $env:GITHUB_OUTPUT
155159
} else {

0 commit comments

Comments
 (0)