Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 2.94 KB

RELEASING.md

File metadata and controls

72 lines (59 loc) · 2.94 KB

One-time setup

Set up Sonatype Account

  • Sign up for a Sonatype JIRA account here
  • Click Sign Up in the login box, follow instructions

Get access to repository

  • Go to community support

  • Ask for publish rights by creating an issue similar to this one

    • You must be logged in to create a new issue
    • Use the Create button at the top tab
  • Generate the key gpg --gen-key

    • Keep the defaults, but specify a passphrase
  • Determine your gpg version: gpg --version

  • Find the ID of your public key

    • If you're using GPG version 1.y.z, gpg --list-secret-keys
      • Look for the line with format sec 2048R/ABCDEFGH 2015-11-17
      • The ABCDEFGH is the ID for your public key
    • If you're using GPG version 2.y.z gpg --list-secret-keys --keyid-format LONG
      • Look for line with format sec rsa2048/ABCDEFGHIJKLMNOP
      • The ABCDEFGHIJKLMNOP is the ID. It is 16-byte long, but Gradle only support 8-byte keys. Use the last 8 bytes of the key when following the rest of this document.
      • gpg --export-secret-keys > $HOME/.gnupg/secring.gpg
  • Upload your public key to a public server: gpg --send-keys --keyserver hkp://pgp.mit.edu <YOUR-KEY-ID-HERE>

Add deploy credential settings

  • Create a settings file at $HOME/.gradle/gradle.properties with your key information and your sonatype username/password
signing.keyId=<YOUR-KEY-ID-HERE>
signing.password=<YOUR-PASSWORD-HERE>
signing.secretKeyRingFile=/usr/local/google/home/<YOUR-USER-NAME>/.gnupg/secring.gpg

ossrhUsername=<YOUR-NEXUS-USERNAME>
ossrhPassword=<YOUR-NEXUS-PASSWORD>

Install releasetool

See releasetool for installation instructions. You will need python 3.6+ to run this tool.

To prepare a release

Update version and deploy to Sonatype

  1. Run releasetool start. Select "minor" or "patch" for the release type. This will bump the artifact versions, ask you to edit release notes, and create the release pull request. When prompted, choose to autorelease.
  • Note: be sure to make these notes nice as they will be used for the release notes as well.
  1. Request a review on the PR.
  2. Submit the PR.
  3. Automation will run in the background to handle the release.
  4. It will take some time (~10 min to ~8 hours) for the package to transition
  5. Automation will publish a new release on Github using releasetool and publish javadocs to https://googleapis.dev/java/gax/latest.

Bump development version

  1. Run releasetool start again, but specify "snapshot" when prompted for the type of release. This will bump the artifact versions and create a new snapshot pull request.
  2. Review and submit the PR.