Closed steffen-wilke closed 2 years ago
I've added the required secrets to our repository:
OSSRH_GPG_SECRET_KEY
OSSRH_GPG_SECRET_KEY_PASSWORD
OSSRH_USERNAME
OSSRH_PASSWORD
For the gpg key there is an inherent issue with passing it through GitHub actions because it has multiple lines. My solution for this problem was to save the key with #
instead of new line characters and replace them in the build script:
https://github.com/weisJ/darklaf/blob/378b6f19eae5f5e7b8ac997ea20490c3edd6776d/build.gradle.kts#L213
I’ll adjust #436 to add support publishing to maven central. Probably there should be a separate action for snapshots and releases. Both should probably create a corresponding release + tag in the repo which included the jpackage artifacts.
Apparently replacing newlines with \n
directly also does the trick (see How to Sign and Release to The Central Repository with GitHub Actions).
I did that for the OSSRH_GPG_SECRET_KEY
to make it a one-line value.
@weisJ Since I'm currently fiddling around with this:
The publishing plugin auto-generates tasks based on the PubName
(see Maven Publish Plugin Docs), which is something I'm currently struggling with. The actual publish
task currently does nothing and right now I'm only able to publish to mavenLocal
but there are no tasks for the staging
repo.
@weisJ Thank you very much! The new version has been published to Maven Central.
Do you know whether it's possible to create the Github release just as a draft? We like to provide some more manual info there about the release and what it contains. Triggering a release also notifies followers of the repository but without the adjusted Release Notes ("just" the auto-generated) one.
Yes simply add draft: true
to the action in the workflow :)
Right now we publish our library manually from my local machine to Maven Central. This process is tedious and requires repetitive work to be done which also makes it error-prone and it relies on my local setup.
Also, the entire process of publishing the engine is currently described in a private repo which needs to be kept up-to-date. Automating the process would add the process as code which increases reliability.
I recently found this gem that describes how to automate this process with GitHub Actions: How to Sign and Release to The Central Repository with GitHub Actions
In short, we'll need to do the following:
release = true
flagAdditional thoughts This is somewhat related to #438 and #436