Skip to content

Commit

Permalink
Update build-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Sep 11, 2024
1 parent 3fa0fea commit 7a47c72
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,27 @@ jobs:
else
echo "release_exists=false" >> $GITHUB_ENV
fi
env:
GH_TOKEN: ${{ github.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Delete existing release and tag if found
if: env.release_exists == 'true'
run: |
gh release delete v${{ env.VERSION }} --yes
git tag -d v${{ env.VERSION }}
git push origin :refs/tags/v${{ env.VERSION }}
env:
GH_TOKEN: ${{ github.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new Git tag
run: |
git tag v${{ env.VERSION }}
git push origin v${{ env.VERSION }}
env:
GH_TOKEN: ${{ github.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create new GitHub Release and Tag
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit 7a47c72

Please sign in to comment.