mirror of
https://github.com/nixietab/picodulce.git
synced 2025-04-09 18:08:57 +01:00
Update Build.yml
This commit is contained in:
parent
bce36c3728
commit
fe6d409fb5
10
.github/workflows/Build.yml
vendored
10
.github/workflows/Build.yml
vendored
@ -38,14 +38,17 @@ jobs:
|
|||||||
- name: Read version and name from version.json
|
- name: Read version and name from version.json
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
$VERSION = (jq -r '.version' version.json)
|
VERSION=$(jq -r '.version' version.json)
|
||||||
$NAME = (jq -r '.name' version.json)
|
NAME=$(jq -r '.name' version.json)
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV # Store version in the environment variable
|
echo "VERSION=$VERSION" >> $GITHUB_ENV # Store version in the environment variable
|
||||||
echo "NAME=$NAME" >> $GITHUB_ENV # Store name in the environment variable
|
echo "NAME=$NAME" >> $GITHUB_ENV # Store name in the environment variable
|
||||||
|
|
||||||
- name: Check if tag exists
|
- name: Check if tag exists
|
||||||
run: |
|
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
|
- name: Tag release
|
||||||
run: |
|
run: |
|
||||||
@ -60,7 +63,6 @@ jobs:
|
|||||||
git tag -a "v${{ env.VERSION }}" -m "Release ${{ env.VERSION }} ${{ env.NAME }}" # Tag the release
|
git tag -a "v${{ env.VERSION }}" -m "Release ${{ env.VERSION }} ${{ env.NAME }}" # Tag the release
|
||||||
git push origin --tags # Push all tags to GitHub
|
git push origin --tags # Push all tags to GitHub
|
||||||
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
Loading…
Reference in New Issue
Block a user