Skip to content

Release automation overhaul: Sonatype Nexus, Shipkit and GH Actions#52

Merged
wmoustafa merged 2 commits intolinkedin:masterfrom
mockitoguy:sf
Mar 22, 2021
Merged

Release automation overhaul: Sonatype Nexus, Shipkit and GH Actions#52
wmoustafa merged 2 commits intolinkedin:masterfrom
mockitoguy:sf

Conversation

@mockitoguy
Copy link
Copy Markdown
Contributor

This change is backwards compatible, please review!

  • enables concurrent releases
  • avoids unnecessary version bump commits
  • migrates off discontinued tech (Bintray, Shipkit 2.x)
  • GH Actions are faster and more convenient to use than Travis CI

Implemented migrations:

  • Bintray -> Sonatype Nexus
  • Travis -> GH Actions (kept simple travis build for comparing)
  • Shipkit 2.0 -> Shipkit 3.0 (new plugins)

Tested by:

  • ./gradlew build - builds, runs tests
  • ./gradlew publish - publishes to rootDir/build/repo, artifacts look good
  • ./gradlew githubRelease - release correctly published to https://github.com/mockitoguy/coral/releases/tag/v1.0.28
  • ./gradlew publishToSonatype - archives correctly published to staging repo on Sonatype

Post-merge actions:

For releases from CI to work, maintainers need to export GitHub secrets so that they are available in GH Actions:

  1. For publishing to Sonatype Nexus / Maven Central configure SONATYPE_USER and SONATYPE_PWD secrets. Official guide on publishing to Sonatype Nexus: https://central.sonatype.org/pages/ossrh-guide.html
  2. For signing, we need PGP_KEY and PGP_PWD secrets. Here's a somewhat useful guide: https://medium.com/@nmauti/sign-and-publish-on-maven-central-a-project-with-the-new-maven-publish-gradle-plugin-22a72a4bfd4b Hint: once you generate the PGP key, here's how you can view it: gpg --export-secret-keys -a KEY_ID

Implemented migrations:
- Bintray -> Sonatype Nexus
- Travis -> GH Actions
- Shipkit 2.0 -> Shipkit 3.0 (new plugins)

Benefits:
- enables concurrent releases
- migrates off discontinued tech
- eliminates version bump commits
@mockitoguy
Copy link
Copy Markdown
Contributor Author

@wmoustafa, merging this needs some work on your end (exporting secrets to GH Actions, verifying e2e releases with Maven Central). I added details to PR description and I hope they are useful!

@wmoustafa
Copy link
Copy Markdown
Contributor

Thanks @mockitoguy! This looks good. I think it is similar to the approach in #51, but uses the new Shipkit plugins and Github Actions. I have setup the secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants