Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release view $env:RELEASE_TAG 2>$null
$ErrorActionPreference = 'Continue'
gh release view $env:RELEASE_TAG --json tagName 2>$null | Out-Null
if ($LASTEXITCODE -eq 0) { throw "Release $env:RELEASE_TAG already exists" }
Write-Host "$env:RELEASE_TAG is free"

# "Not found" leaves $LASTEXITCODE at 1, and the runner ends every
# pwsh step with `exit $LASTEXITCODE` — so without this the step
# fails precisely when the check has passed.
exit 0

- name: Build release packages
shell: pwsh
run: ./build-release.ps1
Expand Down
Loading