-
Notifications
You must be signed in to change notification settings - Fork 39
31 lines (29 loc) · 970 Bytes
/
release.yml
File metadata and controls
31 lines (29 loc) · 970 Bytes
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
name: release a new version to maven central
on:
release:
types:
- released
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Set version
run: "echo ${GITHUB_REF##*/} | sed -e s/^v// | mvn versions:set -DnewVersion= && mvn versions:commit"
- name: Publish to Apache Maven Central
run: mvn deploy -PsonatypeDeploy
env:
MAVEN_USERNAME: ${{ secrets.CENTRAL_OSS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_OSS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}