-
Notifications
You must be signed in to change notification settings - Fork 7
34 lines (34 loc) · 1.09 KB
/
deploy-release.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
name: Publish package to the Maven Central Repository
on:
push:
tags:
- "*.*.*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to maven central
run: mvn -B -DskipTests=true --no-transfer-progress -Dgpg.passphrase=${{ secrets.GPG_KEY_PASSPHRASE }} -Prelease clean deploy
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PWD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
target/*.jar
target/*.jar.asc
licence.txt