From c6a660fb14a38ae631c3a6eef842f31baa1b0b71 Mon Sep 17 00:00:00 2001 From: Mads Opheim <71336041+madsop-nav@users.noreply.github.com> Date: Thu, 1 Feb 2024 06:28:15 +0100 Subject: [PATCH] Updates to the GitHub Actions workflow (#7) Including - Support for Java 21 - Newest versions of the actions used - Switch to Eclipse Temurin as distro, as it tends to be included in the github runners, and hence faster - Using the setup-java caching mechanism for maven instead of a separate action, for simplicity Note: This PR also includes https://github.com/openhtmltopdf/openhtmltopdf/pull/6 , as it is needed for the build to run properly. I have activated actions on my fork, so you can see examples of this running at https://github.com/madsop-nav/openhtmltopdf/actions/runs/7695317933 --- .github/workflows/maven.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ca589c058..a15c8ed6b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,5 +1,5 @@ # 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 +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven name: build @@ -11,22 +11,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['8','11','17'] + java: ['8','11','17', '21'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK ${{matrix.java}} - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'temurin' java-version: ${{matrix.java}} + cache: maven - name: Maven -v run: mvn -v - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - name: Build with Maven run: mvn -B package --file pom.xml