-
Notifications
You must be signed in to change notification settings - Fork 174
66 lines (60 loc) · 1.91 KB
/
push.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
64
65
66
name: Chaos Monkey Build
on: [push, pull_request]
jobs:
build:
name: "OS: ${{ matrix.os }}, Java: ${{ matrix.java }}"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [17]
include:
# Build additional java versions
- java: 19
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # need git history for spotless license header
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Spotless
run: ./mvnw spotless:check
- name: Run Maven verify
run: ./mvnw verify -B
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
deploy:
needs: build
name: "Publish snapshot artifacts"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run Maven Deploy
env:
SONATYPE_USERTOKEN: ${{ secrets.SONATYPE_USERTOKEN }}
SONATYPE_USERTOKENPASSWORD: ${{ secrets.SONATYPE_USERTOKENPASSWORD }}
run: ./mvnw deploy -DskipTests --settings .settings.xml