-
Notifications
You must be signed in to change notification settings - Fork 191
Publishing with Sonatype
First, follow the instructions for installing GPG and creating a key file. You will need a version of GPG < 2.1.
If this is your first time releasing KCBQ, you will need to create your JIRA account, and then create a JIRA ticket to request permission(for your account) to deploy artifacts to com.wepay.kcbq
(our groupId). For more information visit OSSRH Guide.
Once you've done that, you should create a gradle.properties
file in your ~/.gradle
directory with the following properties to avoid specifying the same information every time you want to publish:
signing.keyId=<YourKeyId>
signing.password=<YourPublicKeyPassword>
signing.secretKeyRingFile=<PathToYourKeyRingFile>
ossrhUsername=<your-jira-id>
ossrhPassword=<your-jira-password>
After that, you should be able to run the gradle uploadArchives
task successfully.
To publish a snapshot to Sonatype, just make sure that the version number ends in -SNAPSHOT
; to avoid doing so, just make sure it doesn't.
You can then manage your builds (you may need to log in first). If you want to publish a release, click Staging Repositories on the left sidebar under the Build Promotion header, find the repository you want to release. You will first need to Close the repository (This just prevents modification of repository). After that is completed, you will be able to Release the repository. (The location of these commands is near the top of the pane, accompanied by Drop, Refresh, and Promote). Your build should be published shortly afterward, although it may not be visible via Maven search for another couple of hours.