-
Notifications
You must be signed in to change notification settings - Fork 146
57 lines (53 loc) · 1.28 KB
/
main.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Main Build
on:
push:
paths-ignore:
- "docs/**"
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:
jobs:
formatting:
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{matrix.java}}
distribution: 'temurin'
- name: Print Java Version
run: java -version
- uses: axel-op/googlejavaformat-action@v3
with:
args: "--set-exit-if-changed --dry-run --skip-reflowing-long-strings"
version: v1.22.0
skip-commit: true
build:
runs-on: ubuntu-latest
needs: [formatting]
strategy:
matrix:
java: [17]
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn clean package --file pom.xml