File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,14 @@ jobs:
3232 key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3333 restore-keys : ${{ runner.os }}-m2
3434
35- - name : Set PROJECT_VERSION
36- run : export PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
37-
3835 - name : Publish to Apache Maven Central
39- if : ${{ endsWith( env.PROJECT_VERSION, '-SNAPSHOT' }}
40- run : mvn --batch-mode -Prelease deploy
36+ run : |
37+ PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
38+ if [[ "$PROJECT_VERSION" == *-SNAPSHOT ]]; then
39+ mvn --batch-mode -Prelease deploy
40+ else
41+ mvn --batch-mode package
42+ fi
4143 env :
4244 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
4345 MAVEN_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
You can’t perform that action at this time.
0 commit comments