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 11, 2024
1 parent ae1c241 commit f260ac2
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,23 @@ jobs:
-F "key='${{ secrets.SERVER_VERSIONS_KEY }}'" \
-F "platform=windows"
- name: Create tag
id: create_tag
- name: Set up GitHub CLI
run: sudo apt-get install gh -y

- name: Get release info
id: release_info
run: |
if gh release view ${{ github.ref_name }}; then
echo "Release exists"
echo "release_exists=true" >> $GITHUB_ENV
else
echo "release_exists=false" >> $GITHUB_ENV
fi
- name: Delete existing release if found
if: env.release_exists == 'true'
run: |
tag_name="v1.0.${{ github.run_number }}"
git tag $tag_name
git push origin $tag_name
gh release delete ${{ github.ref_name }} --yes
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit f260ac2

Please sign in to comment.