Use new version of publish / staging plugin which has merged the two projects.
MODIFY
.github/workflows/patch-release-build.yml
.github/workflows/patch-release-build.yml
@@ -68,7 +68,7 @@ jobs:
with:
job-id: jdk11
remote-build-cache-proxy-enabled: false
- arguments: build final closeAndReleaseRepository --stacktrace -Prelease.version=${{ github.event.inputs.version }}
+ arguments: build final closeAndReleaseSonatypeStagingRepository --stacktrace -Prelease.version=${{ github.event.inputs.version }}
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}

MODIFY
.github/workflows/release-build.yml
.github/workflows/release-build.yml
@@ -21,7 +21,7 @@ jobs:
with:
job-id: jdk11
remote-build-cache-proxy-enabled: false
- arguments: build final closeAndReleaseRepository --stacktrace -Prelease.version=${{ github.event.inputs.version }}
+ arguments: build final closeAndReleaseSonatypeStagingRepository --stacktrace -Prelease.version=${{ github.event.inputs.version }}
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}

MODIFY
build.gradle
build.gradle
+import java.time.Duration
import nebula.plugin.release.git.opinion.Strategies
plugins {
id 'idea'
- id "de.marcphilipp.nexus-publish" version "0.4.0" apply false
- id "io.codearte.nexus-staging" version "0.22.0"
+ id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "nebula.release" version "15.3.0"
id 'org.gradle.test-retry' version '1.2.0' apply false
@@ -30,15 +30,25 @@ nebulaRelease {
addReleaseBranchPattern(/v\d+\.\d+\.x/)
}
-nexusStaging {
+nexusPublishing {
packageGroup = "io.opentelemetry"
+
+ repositories {
+ sonatype {
username = System.getenv('SONATYPE_USER')
password = System.getenv('SONATYPE_KEY')
+ }
+ }
+
+ connectTimeout = Duration.ofMinutes(5)
+ clientTimeout = Duration.ofMinutes(5)
+ transitionCheckOptions {
// We have many artifacts so Maven Central takes a long time on its compliance checks. This sets
// the timeout for waiting for the repository to close to a comfortable 50 minutes.
- numberOfRetries = 300
- delayBetweenRetriesInMillis = 10000
+ maxRetries.set(300)
+ delayBetween.set(Duration.ofSeconds(10))
+ }
}
// Enable after verifying Maven Central publishing once through manual closing

MODIFY
gradle/publish.gradle
gradle/publish.gradle
-import java.time.Duration
-
apply plugin: 'maven-publish'
apply plugin: 'signing'
-apply plugin: 'de.marcphilipp.nexus-publish'
-
-nexusPublishing {
- repositories {
- sonatype()
- }
-
- connectTimeout = Duration.ofMinutes(5)
- clientTimeout = Duration.ofMinutes(5)
-}
-
publishing {
publications {
maven(MavenPublication) {
@@ -102,7 +89,6 @@ private String artifactPrefix(Project p, String archivesBaseName) {
}
rootProject.tasks.release.finalizedBy tasks.publishToSonatype
-rootProject.tasks.closeAndReleaseRepository.mustRunAfter tasks.publishToSonatype
tasks.withType(Sign).configureEach {
onlyIf { System.getenv("CI") != null }

Use new version of publish / staging plugin which has merged the two projects. (#2519)