From 3cdbcb9f4a942eec9f5f10c67629d5d395a689fa Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 4 Dec 2020 15:40:06 +0000 Subject: [PATCH] github: build with JDK 11 and 15 and deploy with JDK 11 --- .github/workflows/maven-build.yml | 23 ++++++++++++----------- .github/workflows/sonatype-deploy.yml | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 1b38e65..289b4e8 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -1,7 +1,4 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven +name: maven-build on: push: @@ -12,11 +9,15 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + java: [ 11, 15 ] steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Build with Maven - run: mvn -B package --file pom.xml + - uses: kamiazya/setup-graphviz@v1 + - uses: actions/checkout@v2 + - name: setup-jdk-${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: build-jar + run: mvn -B install diff --git a/.github/workflows/sonatype-deploy.yml b/.github/workflows/sonatype-deploy.yml index 3068ff8..bc1facd 100644 --- a/.github/workflows/sonatype-deploy.yml +++ b/.github/workflows/sonatype-deploy.yml @@ -9,10 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Build with Maven run: mvn -B package - name: Nexus Repo Publish