Repository navigation
ci: write the release keyring to a fixed path and set up Java 11 - #287
Merged
Merged
Conversation
The keyring path and the Sonatype staging profile ID are not credentials, so they no longer come from repo secrets. The release job also sets up Java 11, because ubuntu-latest now ships Java 25, which Gradle 8.4 cannot run on.
Contributor
Author
|
The Release job steps from this branch ran once on a throwaway branch: run 43872823685. With the org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release job reads the keyring path and the Sonatype staging profile ID from repo secrets, which have to go after the secret rotation, and neither value is a credential. The job also has no Java setup step, so it would run on the Java 25 that
ubuntu-latestships now, which Gradle 8.4 cannot run on.Solution
$RUNNER_TEMP/secring.gpg, outside the checkout, and pass that path to Gradle throughGITHUB_ENV. The step no longer needssudo.SONATYPE_STAGING_PROFILE_IDfrom a variable. Only the Maven Central step uses it, and that step runs only whenPUBLISH_TARGETSasks for Central.How to verify
GPG_KEY_CONTENTS. The link follows in a comment.SIGNING_SECRET_KEY_RING_FILEandSONATYPE_STAGING_PROFILE_ID.Note
Medium Risk
Changes release signing and publish configuration; mistakes could break artifact signing or Maven Central uploads, but scope is limited to the release workflow.
Overview
Updates release CI so signed publishes run on a pinned JDK and rely less on repo secrets for non-sensitive config.
A new Set up Java 11 step (Corretto, same pattern as the build workflow) keeps Gradle 8.4 off the default newer JDK on
ubuntu-latest.Signing keyring handling now decodes
GPG_KEY_CONTENTSinto$RUNNER_TEMP/secring.gpg(outside the checkout), exports the path viaGITHUB_ENV, and dropssudoplus theSIGNING_SECRET_KEY_RING_FILEsecret from Gradle step env (Gradle still reads the variable from the environment).Maven Central publish reads
SONATYPE_STAGING_PROFILE_IDfrom repository variables instead of secrets.Reviewed by Cursor Bugbot for commit e5b5b58. Bugbot is set up for automated code reviews on this repo. Configure here.