-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.16 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
name: Release artifact to Maven Central Repository
on:
release:
types: [created]
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
default: "X.Y.Z"
developmentVersion:
description: "Next snapshot version"
required: true
default: "X.Y.Z-SNAPSHOT"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: MAVEN_GPG_PRIVATE_KEY
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Maven Deploy
run: mvn clean deploy -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}