File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 3535 with :
3636 distribution : adopt-hotspot
3737 java-version : ${{ matrix.java-version }}
38-
38+
39+ # Check if a tag exists that matches the current project version.
40+ # Write the existence state to the step output 'tagExists'.
41+ - name : ' Check: package version has corresponding git tag'
42+ id : tagged
43+ shell : bash
44+ run : git show-ref --tags --verify --quiet -- "refs/tags/${{ env.JRELEASER_PROJECT_VERSION }}" && echo "tagExists=1" >> $GITHUB_OUTPUT || echo "tagExists=0" >> $GITHUB_OUTPUT
45+
3946 # Run tests & build artifact
40- - name : Run tests & build release
47+ - name : Build
48+ if : steps.tagged.outputs.tagExists == 1
49+ run : ./mvnw test
50+ - name : Build release
51+ if : steps.tagged.outputs.tagExists == 0
4152 run : ./mvnw install -Prelease
4253
4354 # Upload test results
5768 - name : Extract project version to environment variable
5869 run : echo "JRELEASER_PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
5970
60- # Check if a tag exists that matches the current project version.
61- # Write the existence state to the step output 'tagExists'.
62- - name : ' Check: package version has corrosponding git tag'
63- id : tagged
64- shell : bash
65- run : git show-ref --tags --verify --quiet -- "refs/tags/${{ env.JRELEASER_PROJECT_VERSION }}" && echo "tagExists=1" >> $GITHUB_OUTPUT || echo "tagExists=0" >> $GITHUB_OUTPUT
66-
6771 # Make release with JReleaser, only running when the project version does not exist as a tag on the repository.
6872 - name : Release
6973 if : steps.tagged.outputs.tagExists == 0
You can’t perform that action at this time.
0 commit comments