-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (33 loc) · 932 Bytes
/
maven-build.yml
File metadata and controls
41 lines (33 loc) · 932 Bytes
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
name: Maven build
on:
push:
paths-ignore:
- 'example/**'
- '.github/workflows/*example*'
pull_request:
paths-ignore:
- 'example/**'
- '.github/workflows/*example*'
jobs:
build:
runs-on: ubuntu-latest
steps:
# TODO: revert later — currently forcing branch checkout for GitHub build
- name: Checkout current branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref }}
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-v8-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-v8
- name: Build
run: mvn --batch-mode compile
- name: Test and package
run: mvn --batch-mode package