File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
- # This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2
- # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3
-
4
- name : Maven Package
1
+ name : Maven Publish
5
2
6
3
on :
7
4
release :
@@ -22,15 +19,17 @@ jobs:
22
19
with :
23
20
java-version : ' 11'
24
21
distribution : ' temurin'
25
- server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
26
- settings-path : ${{ github.workspace }} # location for the settings.xml file
22
+ server-id : central
23
+ server-username : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
24
+ server-password : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
25
+ gpg-private-key : ${{ secrets.GPG_SECRET_KEY }}
26
+ gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
27
27
28
28
- name : Build with Maven
29
29
run : mvn clean package -Dmaven.javadoc.skip=false
30
30
31
+ - name : Import signing key
32
+ run : gpg --batch --import ${{ secrets.GPG_SECRET_KEY }}
33
+
31
34
- name : Publish to Maven Central
32
- run : mvn -X -s "$MAVEN_SETTINGS" deploy -DskipTests -Dmaven.javadoc.skip=false
33
- env :
34
- GITHUB_TOKEN : ${{ github.token }}
35
- MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
36
- MAVEN_PASSWORD : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
35
+ run : mvn -X -Dgpg.passphrase=${{ secrets.PGP_PASSPHRASE }} deploy -DskipTests -Dmaven.javadoc.skip=false
You can’t perform that action at this time.
0 commit comments