Skip to content

Commit 3e06c2f

Browse files
committed
Update Maven Central publish script to use token instead of user credentials.
1 parent 345fb40 commit 3e06c2f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

publish/publish-root.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ext["ossrhUsername"] = ''
2-
ext["ossrhPassword"] = ''
1+
ext["ossrhToken"] = ''
2+
ext["ossrhTokenPassword"] = ''
33
ext["sonatypeStagingProfileId"] = ''
44
ext["signing.keyId"] = ''
55
ext["signing.password"] = ''
@@ -11,8 +11,8 @@ if (secretPropsFile.exists()) {
1111
new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) }
1212
p.each { name, value -> ext[name] = value }
1313
} else {
14-
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME')
15-
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
14+
ext["ossrhToken"] = System.getenv('OSSRH_TOKEN')
15+
ext["ossrhTokenPassword"] = System.getenv('OSSRH_TOKEN_PASSWORD')
1616
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID')
1717
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID')
1818
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
@@ -23,8 +23,8 @@ nexusPublishing {
2323
repositories {
2424
sonatype {
2525
stagingProfileId = sonatypeStagingProfileId
26-
username = ossrhUsername
27-
password = ossrhPassword
26+
username = ossrhToken
27+
password = ossrhTokenPassword
2828
}
2929
}
3030
}

0 commit comments

Comments
 (0)