Skip to content

Commit 17fbff6

Browse files
committed
ci: fix workflows fails
1 parent 6fe5054 commit 17fbff6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/version-or-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ jobs:
5959
continue-on-error: false
6060
run: |
6161
git fetch --tags
62-
echo "new_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
62+
tag=$(git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags | head -n 1)
63+
if [ -z "$tag" ]; then
64+
echo "new_tag=$last_tag" >> $GITHUB_OUTPUT
65+
else
66+
echo "new_tag=$tag" >> $GITHUB_OUTPUT
67+
fi
6368
6469
- name: Convert version to anchor format
6570
id: version_anchor

0 commit comments

Comments
 (0)