File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,16 @@ jobs:
1515 with :
1616 fetch-depth : 0 # make sure you have full history and tags
1717 - name : Checkout tag if available
18+ id : find_tag
1819 run : |
1920 TAG=$(git tag --points-at HEAD)
2021 if [ -n "$TAG" ]; then
2122 echo "Tag found: $TAG. Checking out tag..."
2223 git checkout "$TAG"
24+ echo "tag=$TAG" >> $GITHUB_OUTPUT
2325 else
2426 echo "No tag found on this commit."
27+ echo "tag=" >> $GITHUB_OUTPUT
2528 fi
2629 - name : Setup JDK
2730 uses : actions/setup-java@v4
4447 env :
4548 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4649 with :
47- tag_name : ${{ github.ref }}
48- release_name : ${{ github.ref }}
49- prerelease : ${{ contains(github.ref , 'beta') || contains(github.ref , 'rc') }}
50+ tag_name : ${{ steps.find_tag.outputs.tag }}
51+ release_name : ${{ steps.find_tag.outputs.tag }}
52+ prerelease : ${{ contains(steps.find_tag.outputs.tag , 'beta') || contains(steps.find_tag.outputs.tag , 'rc') }}
You can’t perform that action at this time.
0 commit comments