Skip to content

Commit

Permalink
Explicitly load tags from shallow gh clone
Browse files Browse the repository at this point in the history
  • Loading branch information
luttje committed Dec 1, 2024
1 parent 67978e4 commit 7abfdf2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/publish_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,17 @@ jobs:

- name: Store the latest tag in a variable
id: get_tag
run: echo "LATEST_TAG=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
run: |
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV
echo "Latest tag is $LATEST_TAG"
- name: Fail if no tag is found
run: |
if [ -z "$LATEST_TAG" ]; then
echo "Failed: No latest tag found"
exit 1
fi
- name: Create a new release
id: create_release
Expand Down

0 comments on commit 7abfdf2

Please sign in to comment.