mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Fix release script once again
This commit is contained in:
parent
49f2f818c6
commit
471f72e607
1 changed files with 13 additions and 1 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -33,6 +33,12 @@ jobs:
|
||||||
- name: Get Latest Tag
|
- name: Get Latest Tag
|
||||||
run: |
|
run: |
|
||||||
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) || echo "v0.0.0")
|
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) || echo "v0.0.0")
|
||||||
|
|
||||||
|
if ! [[ $latest_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: Tag format is invalid. Expected format: vX.X.X"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Latest tag: $latest_tag"
|
echo "Latest tag: $latest_tag"
|
||||||
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
|
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
@ -90,7 +96,13 @@ jobs:
|
||||||
patch=0
|
patch=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_tag="v$major.$minor.$patch"
|
new_tag="$major.$minor.$patch"
|
||||||
|
|
||||||
|
if ! [[ $new_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: New tag's format is invalid. Expected format: vX.X.X"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "New tag: $new_tag"
|
echo "New tag: $new_tag"
|
||||||
echo "new_tag=$new_tag" >> $GITHUB_ENV
|
echo "new_tag=$new_tag" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue