File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1010 runs-on : ubuntu-latest
1111 strategy :
1212 matrix :
13- java : [ 8 ]
13+ java : [ 11, 17 ]
1414
1515 steps :
1616 - uses : actions/checkout@v2
Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 strategy :
1414 matrix :
15- java : [ 8 ]
15+ java : [ 11, 17 ]
1616
1717 steps :
1818 - uses : actions/checkout@v2
@@ -33,13 +33,20 @@ jobs:
3333 - name : Build with Maven and Gradle
3434 run : |
3535 ./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml
36- export MY_POM_VERSION=`./mvnw -q -Dexec.executable="echo" -Dexec.args='${projects.version} ' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec `
37- echo "POM VERSION" ${MY_POM_VERSION }
38- if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
36+ export MY_JAVA_VERSION=`java -version 2>&1 | head -1 | cut -d'" ' -f2 | sed '/^1\./s///' | cut -d'.' -f1 `
37+ echo "JAVA VERSION" ${MY_JAVA_VERSION }
38+ if [[ ${MY_JAVA_VERSION} == "11" ]];
3939 then
40- ./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy
40+ export MY_POM_VERSION=`./mvnw -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
41+ echo "POM VERSION" ${MY_POM_VERSION}
42+ if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
43+ then
44+ ./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy
45+ else
46+ echo "not deploying release: " ${MY_POM_VERSION}
47+ fi
4148 else
42- echo "not deploying release : " ${MY_POM_VERSION }
49+ echo "not deploying on java version : " ${MY_JAVA_VERSION }
4350 fi
4451 env :
4552 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
You can’t perform that action at this time.
0 commit comments