-
Notifications
You must be signed in to change notification settings - Fork 14
36 lines (32 loc) · 1.25 KB
/
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
31
32
33
34
35
36
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: 'Set up GitHub credentials'
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bloomberg Open Source"
- name: 'Publish snapshot to OSSRH'
run: mvn --batch-mode -Possrh -Darguments="-Dmaven.test.skip=true -Dspotbugs.skip=true -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} -Dusername=${{ secrets.GITHUB_TOKEN }}" release:prepare release:perform
env:
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}