-
Notifications
You must be signed in to change notification settings - Fork 29
64 lines (56 loc) · 1.28 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build
on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- {
version: "17"
}
- {
version: "21"
}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java.version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java.version }}
distribution: temurin
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-repo-pr-${{ runner.os }}-${{ steps.get-date.outputs.date }}
- name: Build with Maven
run: mvn -B formatter:validate verify --file pom.xml