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
52
63on :
74 release :
@@ -22,15 +19,17 @@ jobs:
2219 with :
2320 java-version : ' 11'
2421 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 }}
2727
2828 - name : Build with Maven
2929 run : mvn clean package -Dmaven.javadoc.skip=false
3030
31+ - name : Import signing key
32+ run : gpg --batch --import ${{ secrets.GPG_SECRET_KEY }}
33+
3134 - 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