This PR updates the build to use the newer gradle-nexus/publish-plugin, which is the official successor and replacement of the previous 2 plugins for nexus-staging and nexus-publishing.
I copied the same GitHub action for publishing a build to Sonatype from AsciidoctorJ.
To release a version to Sonatype the project version should be a release version, i.e., no -SNAPSHOT version.
A release can be built and published by selecting the "Actions" menu and then the "Release" workflow.
On the right side you can find a drop down "Run workflow" which allows to trigger the execution of the flow.
Before this will work the following secrets have to created in an environment named release:
GPG_KEY_ID
This can be obtained by running gpg --list-secret-keys:
In this case the GPG_KEY_ID has to be set to F6A7657E.
GPG_PRIVATE_KEY
This can be obtained by running gpg --export-secret-keys <keyId> | base64:
GPG_PASSPHRASE
This must contain the passphrase that protects the private key
OSS_SONATYPE_USERNAME & OSS_SONATYPE_PASSWORD
This must contain the username that is used to log in to the sonatype UI.
Alternatively you can go to the sonatype UI, select your user name in the top right, select Profile, then User Token in the drop down menu at the top, and then click Access User Token. This will give you an alternative user name and password.
I don't have the permissions to create secrets in this repo right now.
I also upgraded the version of gradle, since the current version did not allow to sign the artifacts with my new key, the provided version of bouncycastle seems to be too old.
…sh to Sonatype
This PR updates the build to use the newer gradle-nexus/publish-plugin, which is the official successor and replacement of the previous 2 plugins for nexus-staging and nexus-publishing. I copied the same GitHub action for publishing a build to Sonatype from AsciidoctorJ.
To release a version to Sonatype the project version should be a release version, i.e., no -SNAPSHOT version. A release can be built and published by selecting the "Actions" menu and then the "Release" workflow. On the right side you can find a drop down "Run workflow" which allows to trigger the execution of the flow.
Before this will work the following secrets have to created in an environment named
release
:GPG_KEY_ID
This can be obtained by runninggpg --list-secret-keys
:In this case the
GPG_KEY_ID
has to be set toF6A7657E
.GPG_PRIVATE_KEY
This can be obtained by runninggpg --export-secret-keys <keyId> | base64
:GPG_PASSPHRASE
This must contain the passphrase that protects the private keyOSS_SONATYPE_USERNAME
&OSS_SONATYPE_PASSWORD
This must contain the username that is used to log in to the sonatype UI. Alternatively you can go to the sonatype UI, select your user name in the top right, selectProfile
, thenUser Token
in the drop down menu at the top, and then clickAccess User Token
. This will give you an alternative user name and password.I don't have the permissions to create secrets in this repo right now.
I also upgraded the version of gradle, since the current version did not allow to sign the artifacts with my new key, the provided version of bouncycastle seems to be too old.