Skip to content

Commit

Permalink
Update build-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax authored Sep 16, 2024
1 parent 7622713 commit fc33b5e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,13 @@ jobs:
- name: Authenticate GitHub CLI
run: gh auth login --with-token <<< ${{ secrets.GITHUB_TOKEN }}

- name: Check if release exists
id: check_release
- name: Delete existing release and tag if found
run: |
if gh release view v${{ env.VERSION }} > /dev/null 2>&1; then
echo "Release exists"
echo "release_exists=true" >> $GITHUB_ENV
else
echo "Release does not exist"
echo "release_exists=false" >> $GITHUB_ENV
fi
- name: Delete existing release and tag if found
if: env.release_exists == 'true'
run: |
gh release delete v${{ env.VERSION }} --yes
gh release delete v${{ env.VERSION }} --yes
end
git tag -d v${{ env.VERSION }} || true
git push origin :refs/tags/v${{ env.VERSION }} || true
env:
Expand Down

0 comments on commit fc33b5e

Please sign in to comment.