Skip to content

Commit

Permalink
Merge pull request #24 from wiemanboy/feature/updated-release
Browse files Browse the repository at this point in the history
FIX: only delete non drafts
  • Loading branch information
wiemanboy authored Oct 26, 2024
2 parents d3c272a + b5ca914 commit 2706591
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ jobs:
- name: Publish Draft
run: |
existing_release=$(gh release view "${{ env.VERSION }}" --json id --jq '.id // empty')
echo $existing_release
if [[ -n "$existing_release" && "$existing_release" != "release not found" ]]; then
existing_release=$(gh release view "${{ env.VERSION }}" --json isDraft --jq '.isDraft // empty')
if [[ -n "$existing_release" && $existing_release == "false" ]]; then
echo "Deleting existing release for version ${{ env.VERSION }}"
gh release delete "${{ env.VERSION }}" --yes --repo ${{ github.repository }}
fi
Expand Down

0 comments on commit 2706591

Please sign in to comment.