-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.19 KB
/
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
35
36
37
38
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Publish version tags to maven central
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Set version
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "VERSION=${TAG/v/}" >> $GITHUB_ENV
- run: echo "Will start a Maven Central upload with tag ${VERSION}"
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3.6.0
with:
java-version: 17
distribution: 'zulu'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
cache: 'maven'
- name: Publish package
run: mvn --batch-mode clean deploy -DperformRelease=true -DskipTests=true -Dcheckstyle.skip
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}