Add github workflows build.yml

This commit is contained in:
Rob Bygrave
2021-10-28 22:19:24 +13:00
committed by GitHub
parent bdad8b258a
commit e92fd2ef06
+36
View File
@@ -0,0 +1,36 @@
name: Maven test and package
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
java_version: [8, 11, 15]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java_version }}
distribution: 'adopt'
- name: Maven cache
uses: actions/cache@v2
env:
cache-name: maven-cache
with:
path:
~/.m2
key: build-${{ env.cache-name }}
- name: Build with Maven
run: mvn package