Skip to content

Latest commit

 

History

History
71 lines (63 loc) · 2.56 KB

RELEASING.md

File metadata and controls

71 lines (63 loc) · 2.56 KB

How To Release

Due to Maven Central's very particular requirements, the release process is a bit elaborate and requires a good deal of local configuration. This guide should walk you through it. It won't do anyone outside of KeepSafe any good, but the workflow is representative of just about any project deploying via Sonatype.

We currently deploy to Maven Central (via Sonatype's OSS Nexus instance).

Prerequisites

  1. A published GPG code-signing key
  2. A Sonatype Nexus OSS account with permission to publish in com.getkeepsafe
  3. Permission to push directly to https://github.com/KeepSafe/Cashier

Setup

  1. Add your GPG key to your github profile - this is required for github to know that your commits and tags are "verified".
  2. Configure your code-signing key in ~/.gradle/gradle.properties:
    signing.keyId=<key ID of your GPG signing key>
    signing.password=<your key's passphrase>
    signing.secretKeyRingFile=/path/to/your/secring.gpg
  3. Configure your Sonatype credentials in ~/.gradle/gradle.properties:
    SONATYPE_NEXUS_USERNAME=<nexus username>
    SONATYPE_NEXUS_PASSWORD=<nexus password>
    SONATYPE_STAGING_PROFILE=com.getkeepsafe
  4. Configure git with your codesigning key; make sure it's the same as the one you use to sign binaries (i.e. it's the same one you added to gradle.properties):
    # Do this for the Cashier repo only
    git config user.email "[email protected]"
    git config user.signingKey "your-key-id"

Pushing a build

  1. Edit gradle.properties, update the VERSION property for the new version release
  2. Edit changelog, add relevant changes, note the date and new version (follow the existing pattern)
  3. Add new ## [Unreleased] header for next release
  4. Verify that the everything works:
    ./gradlew clean check
  5. Make a signed commit:
    git commit -S -m "Release version X.Y.Z"
  6. Make a signed tag:
    git tag -s -a X.Y.Z
  7. Upload binaries to Staging:
    ./gradlew publish
  8. Publish to Release:
    ./gradlew closeAndReleaseRepository
  9. Wait until that's done. It takes a while to publish and be available in MavenCentral. Monitor until the latest published version is visible.
  10. Hooray, we're in Maven Central now!
  11. Push all of our work to Github to make it official. Check previous releases and edit tag release changes:
    git push --tags origin master