-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.08 KB
/
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: Publish to Central
on:
release:
types: [published]
permissions: read-all
jobs:
publish:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.release.target_commitish }}
- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b
with:
java-version: 21
distribution: 'temurin'
cache: maven
server-id: nexus-releases
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }}
run: mvn -e --no-transfer-progress --batch-mode deploy -P release-sign-artifacts