Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate deployment to Maven Central #101

Open
pwittchen opened this issue Mar 10, 2023 · 0 comments
Open

Automate deployment to Maven Central #101

pwittchen opened this issue Mar 10, 2023 · 0 comments

Comments

@pwittchen
Copy link
Owner

pwittchen commented Mar 10, 2023

Currently I'm performing deployments manually from my computer.

It should be possible to execute the following gradle commands on GH Actions CI:

  • uploadArchives
  • closeAndReleaseRepository

I've already added secrets to this repo via GH secret configuration.

Things to be done:

  • build project
  • add private gpg key to the project during the build (GPG_PRIVATE_KEY secret)
  • configure signing.keyId gradle param with GPG_KEY_ID secret
  • configure signing.password gradle param with GPG_PASSWORD secret
  • configure signing.secretKeyRingFile (it's defined locally on my machine) or a specific certificate (2nd point) - maybe this can be skipped, left empty or replaced with something else -> to be verified and tested
  • configure NEXUS_USERNAME gradle param with NEXUS_USERNAME secret
  • configure NEXUS_PASSWORD gradle param with NEXUS_PASSWORD secret
  • run uploadArchives gradle command
  • run closeAndReleaseRepository gradle command (this should be tested once command above will work because during tests we can upload and then remove artifacts without releasing them and when command above will fail, this one will fail too)

Notes:

  • Probably CI signing configuration will be a bit different than the local one. I think, the best idea would be to load private GPG Key into memory with GH action and then use in memory GPG Key with Key Id and Key Password and add appropriate gradle singing configuration according to the documentation. Then We can skip signing.secretKeyRingFile which is in the local setup.

References:

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

No branches or pull requests

1 participant