File tree Expand file tree Collapse file tree 3 files changed +280
-227
lines changed Expand file tree Collapse file tree 3 files changed +280
-227
lines changed Original file line number Diff line number Diff line change 1+ name : Manual Maven Deploy Package
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ VERSION :
7+ description : ' The SemVer version number'
8+ required : true
9+
10+ jobs :
11+ build :
12+
13+ runs-on : ubuntu-latest
14+
15+ env :
16+ artifact_name : jpt
17+
18+ steps :
19+ - uses : actions/checkout@v2
20+ - name : Set up JDK 11
21+ uses : actions/setup-java@v1
22+ with :
23+ java-version : 1.11
24+ server-id : github
25+
26+ - name : Build with Maven
27+ run : mvn -B package --file pom.xml
28+
29+ - name : Update package version
30+ run : mvn versions:set -DnewVersion=${{ github.event.inputs.VERSION }}
31+
32+ - name : Publish to GitHub Packages Apache Maven
33+ run : mvn deploy -PgithubDeploy
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+
37+
Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ jobs:
1919 id : get_version
2020 run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
2121
22- - name : Set up JDK 1.8 for deploy to OSSRH
22+ - name : Set up JDK 11 for deploy to OSSRH
2323 uses : actions/setup-java@v1
2424 with :
25- java-version : 1.8
25+ java-version : 1.11
2626 server-id : ossrh
2727 server-username : MAVEN_USERNAME
2828 server-password : MAVEN_CENTRAL_TOKEN
@@ -42,10 +42,10 @@ jobs:
4242 MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
4343 MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4444
45- - name : Set up JDK 1.8 for deploy to github packages
45+ - name : Set up JDK 11 for deploy to github packages
4646 uses : actions/setup-java@v1
4747 with :
48- java-version : 1.8
48+ java-version : 1.11
4949 server-id : github
5050
5151 - name : Publish to GitHub Packages Apache Maven
You can’t perform that action at this time.
0 commit comments