Skip to content

Commit 3c9c2da

Browse files
authored
Improve tag retrieval error handling in workflow
Updated error message to handle first run scenario.
1 parent d99105b commit 3c9c2da

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/build-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ jobs:
6767
run: |
6868
tag=$(git describe --tags --abbrev=0 origin/main)
6969
if [ -z "$tag" ]; then
70-
echo "Latest tag not found" && exit 1
70+
echo "Latest tag not found, likely the first time this script has been ran. Falling back to 0.0.0"
71+
echo "tag=0.0.0" >> $GITHUB_OUTPUT
7172
else
7273
echo "Latest tag found: $tag"
7374
echo "tag=$tag" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)