-
Notifications
You must be signed in to change notification settings - Fork 17
48 lines (46 loc) · 1.12 KB
/
ci.yml
File metadata and controls
48 lines (46 loc) · 1.12 KB
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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21, 23, 24 ]
env:
JAVA: ${{ matrix.java }}
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Test
run: mvn -B test jacoco:report
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: JAVA
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
name: Deploy
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
- name: Deploy
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn -B clean deploy --settings ci-settings.xml -DskipTests