Skip to content

Rework how we release to central #14146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2025
Merged

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Jun 27, 2025

Since the last release with OSSRH Staging API didn't go well we need an alternative way for future releases. We could either adopt JReleaser or one of the plugins from https://central.sonatype.org/publish/publish-portal-gradle/#alternatives or build our own solution.
To publish to central we first publish to a local maven repository named ReleaseRepo using publishAllPublicationToReleaseRepoRepository then we zip that repository using generateReleaseBundle (these 2 were tested when fixing the 2.17.0 release) and finally upload it with uploadReleaseBundle (this one is untested). We could test by failing the build at the end of uploadReleaseBundle and check whether the uploaded bundle is valid in the publisher portal.

@laurit laurit requested a review from a team as a code owner June 27, 2025 13:11
@@ -16,6 +20,12 @@ plugins {
id("org.graalvm.buildtools.native") apply false
}

buildscript {
dependencies {
classpath("com.squareup.okhttp3:okhttp:4.12.0")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initially wanted to use jdk http client but doing the multipart upload there seemed too hard


var query = "?name=opentelemetry-java-instrumentation-$stableVersion"
// uncomment to automatically publish the release
// query += "&publishingType=AUTOMATIC"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this parameter we need to publish the uploaded bundled manually. After first successful release we can uncomment it.

Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could become a new gradle plugin 😄

@trask trask added this to the v2.18.0 milestone Jun 28, 2025
@trask trask merged commit bbb1028 into open-telemetry:main Jul 9, 2025
89 checks passed
trask pushed a commit to trask/opentelemetry-java-instrumentation that referenced this pull request Jul 9, 2025
@laurit laurit deleted the central-release branch July 9, 2025 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants