publish-plugin
publish-plugin copied to clipboard
Creating a GitHub Actions workflow with the plugin.
I'm working on creating a workflow, but I don't know how to pass in the required signing parameter (which usually get passed as Gradle properties). Is there a way to do that with the plugin?
See this example: https://github.com/kit-data-manager/nexus-publish-example
@DavideD Thanks, just a short question. What about the secret key ring file?
I set this up prior to that example, which is probably identical. If I recall correctly, you use the signingKey
with useInMemoryPgpKeys
instead of the key ring file. The signingKey
and signingPassword
are stored as secrets.
Thanks. Do you know how I can get the signing key (I've already generated a pair)?
@DavideD documented the steps which was nice of him.
gpg --armor --export-secret-keys $ID > ascii.key
Thank you so much! I'll check it out!
Weird - when I put my private key in (whether with or without newlines), I get an error (this is without newlines):
Cause: invalid armor
full log: https://gist.github.com/TheOnlyTails/69a172fa3638a46a3acaf6c75b5e60d1
Have you tried to test what was proposed here:
https://github.com/HandBrake/HandBrake/issues/1608
I finally had the idea to try printing the key when signing it, and turns out that if I pass it as a property, it gets cut off, like this:
lWWGBGByDfwBDADB5pWxgBT04U0bDIv/Pv0zDEYqKXt2Dubj3RcvCDAveel3eYFs
When the actual key is much, much longer.
Have you checked the original key at the position where it stops in the output? Is there any carriage return or line feed character?
You may try this suggestion at StackOverflow in order to get rid of line breaks. I hope this helps.
I regenerated the keys and tried again with that format, but for some reason, it still reads that one. Even weirder - when I close the repo manually, it works fine.
If you're supplying signing key etc as GitHub secrets, those need to be Base64 encoded. See this project for a fully working solution. I had created https://github.com/gradle-nexus/publish-plugin/issues/85 which would alleviate the signing issue, although there's little movement on that ticket.