-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (44 loc) · 1.27 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
45
46
---
name: build
on:
push:
branches:
- main
- '1'
pull_request:
branches:
- main
- '1'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write # to publish test results?
env:
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE
- name: Build with Maven
run: mvn -B deploy
env:
SONATYPE_USERNAME: mihxil
SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
- uses: codecov/codecov-action@v3.1.4
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2.11.0
with:
check_name: Tests results
files: "target/surefire-reports/*.xml"