Skip to content

Commit 44054d2

Browse files
committed
Migrate to Central Portal OSSRH Staging API
1 parent 074af88 commit 44054d2

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

.github/workflows/gradle.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@ jobs:
5959
env:
6060
SECRING_FILE: ${{ secrets.SECRING_FILE }}
6161
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
62-
- name: Publish to Sonatype OSSRH
62+
- name: Publish to Maven Central Portal
6363
id: publish
6464
env:
65-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
66-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
67-
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }}
68-
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
65+
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }}
66+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
6967
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
7068
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
7169
SECRING_FILE: ${{ secrets.SECRING_FILE }}

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,12 @@ jobs:
7070
env:
7171
SECRING_FILE: ${{ secrets.SECRING_FILE }}
7272
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
73-
- name: Publish to Sonatype OSSRH
73+
- name: Publish to Maven Central Portal
7474
id: publish
7575
if: steps.secring.outcome == 'success'
7676
env:
77-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
78-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
79-
SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }}
80-
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
77+
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }}
78+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
8179
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
8280
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
8381
SECRING_FILE: ${{ secrets.SECRING_FILE }}

build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,15 @@ assets {
137137
}
138138

139139
nexusPublishing {
140+
packageGroup = 'org.graceframework.plugins'
140141
repositories {
141142
sonatype {
142-
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
143-
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
144-
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
145-
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
146-
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
147-
username = ossUser
148-
password = ossPass
149-
stagingProfileId = ossStagingProfileId
143+
def mavenUser = System.getenv("MAVEN_CENTRAL_USER") ?: project.hasProperty("mavenCentralUsername") ? project.mavenCentralUsername : ''
144+
def mavenPass = System.getenv("MAVEN_CENTRAL_PASSWORD") ?: project.hasProperty("mavenCentralPassword") ? project.mavenCentralPassword : ''
145+
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
146+
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
147+
username = mavenUser
148+
password = mavenPass
150149
}
151150
}
152151
}

0 commit comments

Comments
 (0)