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 52
52
env :
53
53
GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY}}
54
54
55
- - name : Publish to Maven
55
+ - name : Publish to OSSRH Staging API
56
56
run : |
57
57
export GPG_TTY=$(tty)
58
58
mvn clean deploy -DskipTests=true
62
62
GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
63
63
working-directory : Xero-Java
64
64
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
+
65
77
notify-slack-on-success :
66
78
runs-on : ubuntu-latest
67
79
needs : publish
Original file line number Diff line number Diff line change 17
17
<distributionManagement >
18
18
<snapshotRepository >
19
19
<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 >
21
21
</snapshotRepository >
22
22
<repository >
23
23
<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 >
25
25
</repository >
26
26
</distributionManagement >
27
27
<developers >
272
272
<extensions >true</extensions >
273
273
<configuration >
274
274
<serverId >ossrh</serverId >
275
- <nexusUrl >https://oss. sonatype.org /</nexusUrl >
275
+ <nexusUrl >https://ossrh-staging-api.central. sonatype.com /</nexusUrl >
276
276
<autoReleaseAfterClose >true</autoReleaseAfterClose >
277
277
</configuration >
278
278
</plugin >
You can’t perform that action at this time.
0 commit comments