File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package to the Maven Central Repository
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ releaseVersion :
6+ description : " Version to use for the release."
7+ required : true
8+ default : " X.Y.Z"
9+ developmentVersion :
10+ description : " Version to use for further development"
11+ required : true
12+ default : " X.Y.Z-SNAPSHOT"
13+ jobs :
14+ release :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Set up Maven
19+ uses : actions/setup-java@v2
20+ with :
21+ distribution : ' temurin' # Corretto isn't supported right now https://github.com/actions/setup-java/issues/68
22+ java-version : 8
23+ server-id : sonatype-nexus-staging
24+ server-username : MAVEN_USERNAME
25+ server-password : MAVEN_PASSWORD
26+ gpg-private-key : ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
27+ gpg-passphrase : GPG_PASSPHRASE # env variable for GPG private key passphrase
28+ - name : Release and publish package
29+ run : mvn release:prepare release:perform -B -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
30+ env :
31+ MAVEN_USERNAME : ${{ secrets.OSSRH_JIRA_USERNAME }}
32+ MAVEN_PASSWORD : ${{ secrets.OSSRH_JIRA_PASSWORD }}
33+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
You can’t perform that action at this time.
0 commit comments