We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f48fc7c + d4e5492 commit ea98055Copy full SHA for ea98055
1 file changed
.github/workflows/release_build.yaml
@@ -19,10 +19,27 @@ jobs:
19
shell: msys2 {0}
20
run: |
21
./install.sh
22
+
23
# Upload artifacts to the release
24
- name: Upload to GitHub Release
25
+ if: success()
26
uses: softprops/action-gh-release@v2
27
with:
28
files: packages/*
29
env:
30
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