-
Notifications
You must be signed in to change notification settings - Fork 14
30 lines (28 loc) · 1011 Bytes
/
publish.yaml
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
name: 'Publish to Maven Central'
on: workflow_dispatch
jobs:
publish:
name: 'Publish'
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-package: jdk
check-latest: true
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: GPG_KEY_PASSPHRASE
- name: 'Publish snapshot to OSSRH'
run: mvn --batch-mode -Possrh -DskipTests=true -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} release:prepare release:perform
env:
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}