Skip to content

Commit 0f2d1ee

Browse files
Update .github/workflows/semver.yml
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 8fd7bf2 commit 0f2d1ee

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/semver.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ jobs:
2828
sparse-checkout: min_version.txt
2929
sparse-checkout-cone-mode: false
3030

31+
- name: Get latest tag
3132
- name: Get latest tag
3233
id: tag
3334
run: |
34-
echo "ref=$(git tag --sort=-creatordate | head -n 1)" >> "$GITHUB_OUTPUT"
35+
TAG=$(git tag --sort=-version:refname | head -n 1)
36+
if [ -z "$TAG" ]; then
37+
echo "::error::No tags found; cannot determine semver baseline"
38+
exit 1
39+
fi
40+
echo "ref=$TAG" >> "$GITHUB_OUTPUT"
3541
3642
- uses: mozilla/actions/nss@25cb84d060946c0ad6d2c3f79da479b16d180d71 # v1.1.0
3743
with:

0 commit comments

Comments
 (0)