Skip to content

Commit

Permalink
fix: checkout tag if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier committed Jan 16, 2025
1 parent 85756f0 commit 14cce80
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
with:
fetch-depth: 0 # make sure you have full history and tags
- name: Checkout tag if available
run: |
TAG=$(git tag --points-at HEAD)
if [ -n "$TAG" ]; then
echo "Tag found: $TAG. Checking out tag..."
git checkout "$TAG"
else
echo "No tag found on this commit."
fi
- name: Setup JDK
uses: actions/setup-java@v4
with:
Expand Down

0 comments on commit 14cce80

Please sign in to comment.