Skip to content

Commit f373ade

Browse files
committed
Update Gradle nexus publish + release.yml to Central Sonatype.
1 parent e2006a8 commit f373ade

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
uses: gradle/actions/setup-gradle@v4
1919
- name: release
2020
env:
21-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
22-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
21+
CENTRAL_SONATYPE_USERNAME: ${{ secrets.CENTRAL_SONATYPE_USERNAME }}
22+
CENTRAL_SONATYPE_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_PASSWORD }}
2323
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
2424
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2525
run: |

build.gradle.kts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,14 @@ subprojects {
139139
tasks.withType<Sign> { onlyIf { System.getenv("GPG_PRIVATE_KEY") != null } }
140140
}
141141

142-
nexusPublishing.repositories.sonatype {
143-
username.set(System.getenv("SONATYPE_USERNAME"))
144-
password.set(System.getenv("SONATYPE_PASSWORD"))
142+
// See https://github.com/gradle-nexus/publish-plugin.
143+
nexusPublishing {
144+
repositories {
145+
sonatype {
146+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
147+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
148+
username = System.getenv("CENTRAL_SONATYPE_USERNAME")
149+
password = System.getenv("CENTRAL_SONATYPE_PASSWORD")
150+
}
151+
}
145152
}

0 commit comments

Comments
 (0)