Skip to content

Commit c81074e

Browse files
committed
Update 1.5 GH actions
1 parent c2a483b commit c81074e

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/maven-v1-pulls.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
java: [ 8 ]
13+
java: [ 11, 17 ]
1414

1515
steps:
1616
- uses: actions/checkout@v2

.github/workflows/maven-v1.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
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 }}

0 commit comments

Comments
 (0)