File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 5252 env :
5353 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY}}
5454
55- - name : Publish to Maven
55+ - name : Publish to OSSRH Staging API
5656 run : |
5757 export GPG_TTY=$(tty)
5858 mvn clean deploy -DskipTests=true
6262 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
6363 working-directory : Xero-Java
6464
65+ # This needs to run from the same IP address that the mvn deploy ran on.
66+ # Once this is complete you will need to log in to https://central.sonatype.com/publishing
67+ # to finish the publish. We can supply publishing_type as 'automatic' instead to skip this step.
68+ # See docs: https://central.sonatype.org/publish/publish-portal-ossrh-staging-api
69+ - name : OSSRH Staging API publish
70+ run : |
71+ curl -i -X POST -u "$MAVEN_USERNAME:$MAVEN_PASSWORD" https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.github.xeroapi?publishing_type=user_managed
72+ env :
73+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
74+ MAVEN_PASSWORD : ${{ secrets.MAVEN_TOKEN }}
75+ working-directory : Xero-Java
76+
6577 notify-slack-on-success :
6678 runs-on : ubuntu-latest
6779 needs : publish
Original file line number Diff line number Diff line change 1717 <distributionManagement >
1818 <snapshotRepository >
1919 <id >ossrh</id >
20- <url >https://oss. sonatype.org /content/repositories/snapshots</url >
20+ <url >https://ossrh-staging-api.central. sonatype.com /content/repositories/snapshots</url >
2121 </snapshotRepository >
2222 <repository >
2323 <id >ossrh</id >
24- <url >https://oss. sonatype.org /service/local/staging/deploy/maven2/</url >
24+ <url >https://ossrh-staging-api.central. sonatype.com /service/local/staging/deploy/maven2/</url >
2525 </repository >
2626 </distributionManagement >
2727 <developers >
272272 <extensions >true</extensions >
273273 <configuration >
274274 <serverId >ossrh</serverId >
275- <nexusUrl >https://oss. sonatype.org /</nexusUrl >
275+ <nexusUrl >https://ossrh-staging-api.central. sonatype.com /</nexusUrl >
276276 <autoReleaseAfterClose >true</autoReleaseAfterClose >
277277 </configuration >
278278 </plugin >
You can’t perform that action at this time.
0 commit comments