Skip to content

Commit ea98055

Browse files
committed
2 parents f48fc7c + d4e5492 commit ea98055

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/release_build.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,27 @@ jobs:
1919
shell: msys2 {0}
2020
run: |
2121
./install.sh
22+
2223
# Upload artifacts to the release
2324
- name: Upload to GitHub Release
25+
if: success()
2426
uses: softprops/action-gh-release@v2
2527
with:
2628
files: packages/*
2729
env:
2830
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Delete release and tag on failure
33+
if: failure()
34+
run: |
35+
# Install GitHub CLI
36+
choco install gh -y
37+
38+
# Authenticate GitHub CLI
39+
gh auth login --with-token < $env:GITHUB_TOKEN
40+
41+
# Delete the release and tag
42+
gh release delete $env:GITHUB_REF_NAME --cleanup-tag --yes
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
GITHUB_REF_NAME: ${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)