Skip to content

bump snapshot 1.0.26-SNAPSHOT #6

bump snapshot 1.0.26-SNAPSHOT

bump snapshot 1.0.26-SNAPSHOT #6

Workflow file for this run

name: Build Test Deploy v1
on:
push:
branches: [ "v1" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8 ]
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
server-id: ossrh
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, Deploy snapshot to maven central
run: |
mvn --no-transfer-progress -B verify --file pom.xml
export MY_POM_VERSION=`mvn -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
mvn --no-transfer-progress -B clean deploy
else
echo "not deploying release: " ${MY_POM_VERSION}
fi
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}