Skip to content

Commit 1affc51

Browse files
committed
fix(ci): migrate Maven publishing to Central
Legacy OSSRH was shut down and now rejects staging profile requests.
1 parent 01d5bbb commit 1affc51

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
cache: gradle
1717
- name: Publish with Gradle
1818
env:
19+
# Replace these legacy secret values with a Central Portal user token.
1920
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
2021
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
2122
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ publishing {
8282
nexusPublishing {
8383
repositories {
8484
sonatype {
85-
nexusUrl = uri("https://oss.sonatype.org/service/local/")
86-
snapshotRepositoryUrl = uri("https://oss.sonatype.org/content/repositories/snapshots/")
85+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
86+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
8787
}
8888
}
8989
}

0 commit comments

Comments
 (0)