Update Build.yml

This commit is contained in:
Nix 2024-12-31 11:45:14 -03:00 committed by GitHub
parent bce36c3728
commit fe6d409fb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,14 +38,17 @@ jobs:
- name: Read version and name from version.json
id: version
run: |
$VERSION = (jq -r '.version' version.json)
$NAME = (jq -r '.name' version.json)
VERSION=$(jq -r '.version' version.json)
NAME=$(jq -r '.name' version.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV # Store version in the environment variable
echo "NAME=$NAME" >> $GITHUB_ENV # Store name in the environment variable
- name: Check if tag exists
run: |
git tag # List the tags in the repository to check if the tag exists
if git rev-parse "v${{ env.VERSION }}" >/dev/null 2>&1; then
echo "Tag v${{ env.VERSION }} already exists, skipping tag creation."
exit 0
fi
- name: Tag release
run: |
@ -60,7 +63,6 @@ jobs:
git tag -a "v${{ env.VERSION }}" -m "Release ${{ env.VERSION }} ${{ env.NAME }}" # Tag the release
git push origin --tags # Push all tags to GitHub
- name: Create Release
uses: softprops/action-gh-release@v1
with: