Skip to content

Maven

Maven #240

Workflow file for this run

# Builds using maven
# Pass the arguments you wish to run to maven_commands variable, default command will be mvn install
---
name: Maven
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
strategy:
matrix:
java: [8, 11, 17, 21]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
maven_commands: test # default is install
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
- name: Build
run: mvn ${{ env.maven_commands }}