Skip to content

Commit 05b587f

Browse files
committed
chore: Change logic to get previous tag version
1 parent ae474e3 commit 05b587f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build-binaries.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ jobs:
2222

2323
- name: Get Previous Tag
2424
id: get_previous_tag
25-
run: echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^)" >> $GITHUB_ENV
26-
25+
run: |
26+
TAGS=$(git tag --sort=-creatordate)
27+
CURRENT_TAG=${GITHUB_REF#refs/tags/}
28+
PREVIOUS_TAG=$(echo "$TAGS" | grep -B 1 "$CURRENT_TAG" | head -n 1)
29+
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV
30+
2731
- name: Generate Changelog
2832
id: generate_changelog
2933
run: |

0 commit comments

Comments
 (0)