-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.49 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
47
48
49
---
name: build
on:
push:
branches: [ main, "REL-*" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
cache: maven
server-id: vpro-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 -U -B -Possrh deploy --file pom.xml -Dgpg.skip=false
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}
github_packages:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
cache: maven
- name: Publish to github packages
run: mvn -U -B -Pgithub deploy -Dgpg.skip=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}