-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (35 loc) · 1.09 KB
/
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
name: Publish to Maven Central Repository
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install gpg secret key
run: cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Set up maven settings
uses: s4u/[email protected]
with:
servers: |
[{
"id": "ossrh",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_TOKEN }}"
},
{
"id": "gpg.passphrase",
"passphrase": "${{ secrets.GPG_SECRET_KEY_PASSWORD }}",
"configuration": {}
}]
- name: Verify package
run: mvn --batch-mode verify
- name: Release package
run: mvn --batch-mode -DskipTests=true releaser:release