Skip to content

Commit 47792ff

Browse files
Update Create-NewReleases.yml
1 parent 0e69062 commit 47792ff

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/Create-NewReleases.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ jobs:
2828
- name: Determine Next Version Tag
2929
id: nextver
3030
run: |
31-
TAG=$(git tag --sort=-v:refname | head -n 1)
32-
if [[ $TAG == '' ]]; then
33-
TAG='v0.1.0' # Start from v0.1.0 if no tags are found
31+
if [[ -f version.txt ]]; then
32+
TAG=$(cat version.txt)
33+
else
34+
TAG=$(git tag --sort=-v:refname | head -n 1)
35+
if [[ $TAG == '' ]]; then
36+
TAG='v0.1.0' # Start from v0.1.0 if no tags are found
37+
fi
3438
fi
3539
MAJOR=$(echo $TAG | cut -d '.' -f 1 | cut -c 2-)
3640
MINOR=$(echo $TAG | cut -d '.' -f 2)

0 commit comments

Comments
 (0)