Skip to content

Commit 99bc109

Browse files
committed
fix tag sorting and remove suffix
1 parent 01439eb commit 99bc109

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/sodium.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,15 @@ jobs:
2828
submodules: recursive
2929

3030
- name: Checkout latest Tag
31+
id: print-version
3132
shell: bash
3233
run: |
3334
git fetch --tags
34-
LATEST_TAG=$(git tag | grep -E ^[0-9]+.[0-9]+.[0-9]+$ | tail -1)
35+
LATEST_TAG=$(git tag --sort=-v:refname | head -1)
3536
git checkout "$LATEST_TAG"
36-
echo "version=$LATEST_TAG" >> $GITHUB_OUTPUT
37+
VERSION="${LATEST_TAG%-RELEASE}"
38+
VERSION="${VERSION%-FINAL}"
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
3740
3841
- name: Install Visual Studio 2022 Build Tools
3942
if: matrix.os == 'windows-latest'

0 commit comments

Comments
 (0)