Skip to content

Commit 1608abd

Browse files
committed
ci(windows build): Continue building even if the previous release did not exist
1 parent 058b196 commit 1608abd

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/windows_build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,14 @@ jobs:
569569
if (("${{ github.ref }}" -eq $formatted) -and ("${{ steps.check_tags.outputs.has_stable_tag }}" -eq 'false')) { Write-Host 'true' } else { Write-Host 'false' }
570570
571571
- name: Delete previous Pre Release
572-
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && steps.check_tags.outputs.has_stable_tag == 'false'
573-
run: gh release delete latest-development-build --cleanup-tag
572+
if: startsWith(github.ref, 'refs/tags/v') || (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && steps.check_tags.outputs.has_stable_tag == 'false')
573+
run: |
574+
gh release delete latest-development-build --cleanup-tag
575+
if ($LASTEXITCODE -eq 0) {
576+
Write-Host "Successfully deleted previous release"
577+
} else {
578+
Write-Host "Release not found or failed to delete, continuing..."
579+
}
574580
env:
575581
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
576582

0 commit comments

Comments
 (0)