-
Notifications
You must be signed in to change notification settings - Fork 24
Configure maven central publishing #1042
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
+46
−13
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,14 +57,29 @@ jobs: | |
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1 | ||
|
||
- name: Authenticate to Google Cloud | ||
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v0.8.1 | ||
with: | ||
workload_identity_provider: projects/306323169285/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider | ||
service_account: [email protected] | ||
|
||
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3 | ||
id: secrets | ||
with: | ||
secrets: |- | ||
signing_key:sigstore-secrets/sigstore-java-pgp-priv-key | ||
signing_password:sigstore-secrets/sigstore-java-pgp-priv-key-password | ||
sonatype_username:sigstore-secrets/sigstore-sonatype-central-portal-username | ||
sonatype_password:sigstore-secrets/sigstore-sonatype-central-portal-password | ||
- name: Build, Sign and Release to Maven Central | ||
run: | | ||
./gradlew clean :sigstore-java:publishMavenJavaPublicationToSonatypeRepository :sigstore-maven-plugin:publishMavenJavaPublicationToSonatypeRepository -Prelease | ||
env: | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PGP_PRIVATE_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PGP_PASSPHRASE }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ steps.secrets.outputs.signing_key }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ steps.secrets.outputs.signing_password }} | ||
CENTRAL_PORTAL_USERNAME: ${{ steps.secrets.outputs.sonatype_username }} | ||
CENTRAL_PORTAL_PASSWORD: ${{ steps.secrets.outputs.sonatype_password }} | ||
run: | | ||
./gradlew clean :publishAggregationToCentralPortal -Prelease | ||
create-release-on-github: | ||
runs-on: ubuntu-latest | ||
|
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add gradle plugin artifacts as well
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is creating some issue where it's trying to apply the plugin on itself? We can try to add it in after, but for now, I'd like to get this in so we can publish these (and still publish the plugins to the portal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the changes and how do you reproduce the error of "Failed to apply plugin 'dev.sigstore.sign'"?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hrmm interesting, maybe it doesn't add signing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that
sigstore-gradle/sigstore-gradle-sign-base-plugin/build.gradle.kts
already hasid("build-logic.kotlin-dsl-published-gradle-plugin")
which internally hasid("build-logic.publish-to-central")
.So the addition of
id("build-logic.java-published-library")
should not be needed forsigstore-gradle/*/build.gradle.kts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, we'd better move signing to
publish-to-central
or a separate file.I might try signing the plugin itself.
However, I did use
com.github.vlsi.state-vote-release
plugin to releasecom.github.vlsi.state-vote-release
, so the limitation of "plugin can't be used" sounds strange.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think you brought that up when we discussed it last time. I can't remember the details I think it might be lost in slack history unfortunately. If you find a solution I would love to include it. I was just unable to find one that worked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might try once again and add a code comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any update here? I would like to unblock this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, I did not intend to block the pr