update 1.5 Readme with new v2 version 2.2.18 #78
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Test Deploy 1.5 | |
on: | |
push: | |
branches: [ "1.5" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 11, 17 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
server-id: sonatype-nexus-snapshots | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build with Maven and Gradle | |
run: | | |
./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml | |
export MY_JAVA_VERSION=`java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1` | |
echo "JAVA VERSION" ${MY_JAVA_VERSION} | |
if [[ ${MY_JAVA_VERSION} == "11" ]]; | |
then | |
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` | |
echo "POM VERSION" ${MY_POM_VERSION} | |
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]]; | |
then | |
./mvnw -B -Dhttps.protocols=TLSv1.2 clean deploy | |
else | |
echo "not deploying release: " ${MY_POM_VERSION} | |
fi | |
else | |
echo "not deploying on java version: " ${MY_JAVA_VERSION} | |
fi | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} |