Skip to content

Commit

Permalink
fixed workflow file error when not finding any tags to fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark7888 committed Nov 23, 2024
1 parent 9ea442c commit 823149d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ jobs:
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
if [ -z "$(git tag)" ]; then
echo "No tags found, skipping fetch tags"
else
git fetch --depth=1 origin +refs/tags/*:refs/tags/* || (echo "Failed to fetch tags" && exit 1)
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 823149d

Please sign in to comment.