Skip to content

Commit 2f53bc8

Browse files
committed
ci: try to fix work create gh release
1 parent a2eb0ac commit 2f53bc8

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
@@ -36,7 +36,12 @@ jobs:
3636
continue-on-error: false
3737
run: |
3838
git fetch --tags
39-
echo "last_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
39+
tag=$(git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags | head -n 1)
40+
if [ -z "$tag" ]; then
41+
echo "last_tag=" >> $GITHUB_OUTPUT
42+
else
43+
echo "last_tag=$tag" >> $GITHUB_OUTPUT
44+
fi
4045
4146
- name: Create Release Pull Request
4247
uses: changesets/action@v1

0 commit comments

Comments
 (0)