-
Notifications
You must be signed in to change notification settings - Fork 1.1k
35 lines (35 loc) · 1.17 KB
/
maven-publish.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
name: Maven Central Repo Deployment
on:
release:
types: [released, prereleased]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repo
uses: actions/checkout@v2
- name: Set up Maven Central Repo
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
server-id: ossrh
server-username: 'OSSRH_USER'
server-password: 'OSSRH_PASSWORD'
gpg-passphrase: 'GPG_PASSWORD'
gpg-private-key: ${{ secrets.GPG_SECRET }}
- name: debug settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
passphrase: ${{ secrets.GPG_PASSWORD }}
- name: debug private key
run: cat /home/runner/.m2/private-key.txt
- name: Publish to Maven Central Repo
run: mvn clean deploy --batch-mode --activate-profiles deploy
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}