Skip to content

Commit b6f67aa

Browse files
authored
Merge pull request #494 from yoheimuta/fix-upload-maven
fix: Migrated from OSSRH to the Central Publisher Portal
2 parents ad3fbe1 + 2c6c206 commit b6f67aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/goreleaser.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ jobs:
5757
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5858
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
5959
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
60+
- name: Upload to Central Publisher Portal
61+
run: |
62+
curl -X POST \
63+
"https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/io.github.yoheimuta?publishing_type=automatic" \
64+
-H "Authorization: Bearer ${{ secrets.OSSRH_TOKEN }}" \
65+
-H "Content-Type: application/json" \
66+
-d '{}'

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ publishing {
7676
repositories {
7777
maven {
7878
name = "OSSRH"
79-
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
80-
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
79+
def releasesRepoUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
80+
def snapshotsRepoUrl = "https://central.sonatype.com/repository/maven-snapshots/"
8181
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
8282
credentials {
8383
username = System.getenv("MAVEN_USERNAME")

0 commit comments

Comments
 (0)