Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KirisameMarisa authored Jan 6, 2024
1 parent ef73bb4 commit d725a12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ jobs:
runs-on: windows-latest

steps:
- name: Install curl on Windows
run: |
choco install curl
- name: Delete existing draft release
run: |
$releaseId = (curl -s -H "Authorization: Bearer $env:GITHUB_TOKEN" `
"https://api.github.com/repos/${env:GITHUB_REPOSITORY}/releases/tags/${{ steps.gen_release_title.outputs.version }}" | ConvertFrom-Json).id
if ($releaseId -ne $null) {
curl -X DELETE -H "Authorization: Bearer $env:GITHUB_TOKEN" `
"https://api.github.com/repos/${env:GITHUB_REPOSITORY}/releases/$releaseId"
}
- name: Generate release title
id: gen_release_title
run: |
Expand Down

0 comments on commit d725a12

Please sign in to comment.