-
Notifications
You must be signed in to change notification settings - Fork 37
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
Publish to mavencentral #144
Conversation
@@ -280,6 +280,8 @@ section below under "Usage" for more details. | |||
|
|||
### Generating Code | |||
|
|||
> TODO change to Sonatype link after migrating | |||
|
|||
Pbandk's code generator leverages `protoc`. Download the [latest | |||
protoc](https://github.com/google/protobuf/releases/latest) and make sure `protoc` is on the `PATH`. |
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.
See placeholder above so we don't forget to update this link
# files yet. See https://github.com/gradle/gradle/issues/11412 for details. | ||
# Open sonatype issue: https://issues.sonatype.org/browse/NEXUS-23603 | ||
systemProp.org.gradle.internal.publish.checksums.insecure=true |
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 checked and this issue still seems to exist
Thanks for starting this! I had your blog post about migrating to Maven Central up in my browser and was trying to find time to work on it 😄 I had already created a Sonatype account a few weeks ago and went through the process to get approved for artifacts under the Note that our account was provisioned on Sonatype's new infrastructure, so you'll need to use Also, the sync from Sonatype to Maven Central is not enabled yet. They said "Please comment on this ticket when you've released your first component(s), so we can activate the sync to Maven Central." So we'll need to do that after we publish a pbandk release. |
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'll try to get the PGP key created tomorrow and pull down your changes to test them out.
@garyp I've incorporated your suggestions and this PR is ready for a new rounds of review. Two remarks:
|
I have the PGP key generated and I've been trying to test this PR locally. But for some reason neither the signing nor publishing tasks are showing up. I'll keep poking at it... |
Is this because I skip the configuration if no credentials/signing keys are present? Line 51 in 0c58dc8
|
Also the |
Of course I figured it out 5 minutes after writing that. I was trying to use a property file that Gradle doesn't actually read. That's what I get for trying to do this while tired yesterday 😔 I can see both the signing and publishing tasks now (I updated it to use the publishing API). I'll do some more testing later this morning and push up my changes. |
Thank you for driving this forward @garyp ! 🙏 |
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- v[0-9]+.[0-9]+.x |
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 realized that we can get snapshot builds more or less for free by just running the "release" workflow for all pushes to the master
branch. The nexus-publish gradle plugin automatically chooses whether to publish to the OSSRH snapshot or release repository based on whether the version name includes "-SNAPSHOT".
|
||
``` | ||
repositories { | ||
jcenter() | ||
// This repository is only needed if using a SNAPSHOT version of pbandk | ||
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } |
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.
@JeroenMols FYI, if you ever need to test the latest code on master
, every commit to master
should now publish artifacts at this maven URL.
Open items to do:
SONATYPE_API_USER
andSONATYPE_API_KEY
as Github actions secretsSONATYPE_PGP_KEY_BASE64
as Github actions secret (export key usinggpg --export-secret-key --armor | base64
)This PR converts all existing plumbing to upload to Maven Central instead of Bintray. Key changes are:
I've taken this as far as I can take it, for the next steps credentials/signing keys are needed so I'd like for someone else to take over.
Finally note that I was unable to test run
publishToMavenCentralRepository
as Gradle can't find the task. Not sure why, but the same was already happening forpublishToBintrayRepository
so I decided to ignore that.Relates to #120