-
Notifications
You must be signed in to change notification settings - Fork 9
42 lines (39 loc) · 916 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [1.8, 11]
steps:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Checkout
uses: actions/checkout@v2
- name: Maven cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('.github/workflows/build.yml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Maven version
run: |
mkdir -p ./.mvn
echo '-e -B -DtrimStackTrace=false' > ./.mvn/maven.config
mvn --version
mkdir -p target
- name: Maven build
run: |
mvn install