File tree 1 file changed +18
-5
lines changed
1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,31 @@ jobs:
17
17
18
18
steps :
19
19
- uses : actions/checkout@v2
20
- - name : Set up JDK 8
20
+
21
+ - name : Set up Java for publishing to Maven Central Repository
22
+ uses : actions/setup-java@v2
23
+ with :
24
+ java-version : ' 8'
25
+ distribution : ' adopt'
26
+ server-id : ossrh # Value of the distributionManagement/repository/id field of the pom.xml
27
+ server-username : MAVEN_USERNAME
28
+ server-password : MAVEN_PASSWORD
29
+
30
+ - name : Publish to the Maven Central Repository
31
+ run : mvn -P ossrh,sign -B deploy -s $GITHUB_WORKSPACE/settings.xml
32
+ env :
33
+ MAVEN_USERNAME : ${{ secrets.OSSRH_JIRA_USERNAME }}
34
+ MAVEN_PASSWORD : ${{ secrets.OSSRH_JIRA_PASSWORD }}
35
+
36
+ - name : Set up Java for publishing to GitHub Packages
21
37
uses : actions/setup-java@v2
22
38
with :
23
39
java-version : ' 8'
24
40
distribution : ' adopt'
25
41
server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
26
42
settings-path : ${{ github.workspace }} # location for the settings.xml file
27
43
28
- - name : Build with Maven
29
- run : mvn -B package --file pom.xml
30
-
31
44
- name : Publish to GitHub Packages Apache Maven
32
- run : mvn deploy -s $GITHUB_WORKSPACE/settings.xml
45
+ run : mvn -P github -B deploy -s $GITHUB_WORKSPACE/settings.xml
33
46
env :
34
47
GITHUB_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments