Skip to content

Commit

Permalink
Updates to the GitHub Actions workflow (openhtmltopdf#7)
Browse files Browse the repository at this point in the history
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
openhtmltopdf#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
  • Loading branch information
madsop-nav authored Feb 1, 2024
1 parent 980520d commit c6a660f
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

0 comments on commit c6a660f

Please sign in to comment.