-
Notifications
You must be signed in to change notification settings - Fork 118
Releasing to Maven Central
Follow the "Generate a key pair" and "Distributing your public key" sections on this page: http://central.sonatype.org/pages/working-with-pgp-signatures.html
If you have problems with GPG 2.1 or later and issue https://github.com/gradle/gradle/issues/888 is not yet fixed use:
gpg --export-secret-keys >~/.gnupg/secring.gpg
You can build and release to OSSHR with GitHub Actions. Just create a new tag with format sputnik-1.2.3
to trigger a Workflow Action. It will build an artifact, sign it, upload to OSSHR and create GitHub Release draft with assets. Then you need to manually go to Sonatype (read below) and manually review Release draft and publish it.
There is gradle.properties
file in project's dir. It contains signing settings. You can safely override those with a custom file in ~/.gradle/gradle.properties
, which should have entries such as:
signing.keyId=1A6165361333 `
signing.password=password1
signing.secretKeyRingFile=/home/dir/.gnupg/secring.gpg
sonatypeUsername=joe_barr
sonatypePassword=password2
git tag
./gradlew currentVersion
./gradlew markNextVersion -Prelease.version=1.8.0
git tag
./gradlew currentVersion
./gradlew release
$ gradle uploadArchives
TODO - this need to have appropriate screenshots.
If you go here: https://oss.sonatype.org/#stagingRepositories You will see your staging repository in the "open" state. It will not be a part of the public group until you select the Staging Repository and click the "Close" button. Your artifacts will not sync to Central until they are released. So, after you've clicked the "Close" button and (if necessary) done any further testing, you need to select the Staging Repository again, to click the "Release" button. Once you've successfully released, please comment again on this issue, and I can activate the sync to Central.