-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.2 KB
/
maven-release.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
37
38
39
40
41
---
name: Publish package to the Maven Central Repository
on:
release:
types: [ created ]
push:
branches:
- main
- develop
- releases/**
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo '${{ env.GPG_SIGNING_KEY_ID }}'
- name: Setup GPG Signing Key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: 985E1B6AEBD22EBD083E37FD02F5F7011164C342 # ${{ env.GPG_SIGNING_KEY_ID }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- run: gpg -K
- name: Setup Maven Central
uses: actions/setup-java@v3
with:
java-version: 17
distribution: corretto
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish Package
run: mvn --batch-mode --no-transfer-progress clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}