Switch publishing release target to sonatype. (#1823)

* Switch publishing targets to sonatype.

* Continue with jfrog

* typo
This commit is contained in:
Anuraag Agrawal 2020-12-04 12:41:01 +09:00 committed by GitHub
parent 6154538d08
commit f9df981b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View File

@ -3,6 +3,7 @@ import nebula.plugin.release.git.opinion.Strategies
plugins {
id 'idea'
id "io.codearte.nexus-staging" version "0.22.0"
id "nebula.release" version "15.3.0"
id 'org.gradle.test-retry' version '1.2.0' apply false
@ -28,6 +29,13 @@ nebulaRelease {
addReleaseBranchPattern(/v\d+\.\d+\.x/)
}
nexusStaging {
// We publish to two package groups so need to close each group individually until staging profile
// is set up. We'll run the command twice with the two groups.
// TODO(anuraaga): https://issues.sonatype.org/browse/OSSRH-62444
packageGroup = findProperty("mavenCentralGroup")
}
allprojects {
apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/util.gradle"

View File

@ -4,13 +4,19 @@ apply plugin: 'signing'
publishing {
repositories {
maven {
url = version.toString().contains('SNAPSHOT')
? "https://oss.jfrog.org/artifactory/oss-snapshot-local/"
: "https://api.bintray.com/maven/open-telemetry/maven/opentelemetry-java-instrumentation/"
if (version.toString().contains('SNAPSHOT')) {
url = "https://oss.jfrog.org/artifactory/oss-snapshot-local/"
credentials {
username = System.getenv('BINTRAY_USER')
password = System.getenv('BINTRAY_API_KEY')
}
} else {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv('SONATYPE_USER')
password = System.getenv('SONATYPE_KEY')
}
}
}
}