-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (41 loc) · 1.29 KB
/
maven.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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
cache: 'maven'
- name: Create settings.xml
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "vpro-ossrh", "username": "vpro", "password": "${{secrets.SONATYPE_PASSWORD}}"}]'
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
passphrase: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
- name: Build with Maven
run: mvn -B -fn
- name: Publish to codecov
uses: codecov/codecov-action@v2
continue-on-error: true
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
if: ${{ github.event_name == 'push' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with Maven
run: mvn -B -Pdeploy deploy -DskipTests=true -Dgpg.skip=false
if: ${{ github.event_name == 'push' }}