You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create a github action that release on Maven when we create a tag #276
The goal of this task is to automate an event when someone creates a tag.
As soon as the tag is created, the associated github action is started and all the steps of a release would be automatically done.
Minutes later, we would have access to the latest version on Maven.
First step is to retrieve the step of the release process from @jmini and to code them in a github action script. Then, get the proper access and put them in the secrets. Then testing with a real release.
Activity
jmini commentedon May 5, 2022
To create a release:
1) Set the credentials to be able to push to nexus:
2) Change the version and commit.
2a) change the version from
a.b-SNAPSHOTtoa.b=> Example e700b5fWhen commit
(2a)is created, run./gradlew publishToSonatypeCreate tag
a.bon commit(2a)and push it.2b) change the version from
a.btoa.(b+1)-SNAPSHOT=> Example 0dcdfd5For this complete
2)bock an alternative is to use the pluginid 'net.researchgate.release' version '2.6.0'Check the project https://github.com/OpenAPITools/empoa/
Then the plugin is performing the same step when running
./gradlew release -Prelease.useAutomaticVersion=true3) Activities in Nexus
In the Staging Repositories (https://oss.sonatype.org/#stagingRepositories)
Select the corresponding repository (example
orgopenapitools-1292)Check the content (uploaded jars, pom files)
ClosebuttonReleasebuttonIt is also possible to automate those steps inside the gradle plugin (probably nexus publishing).
I like checking manually before publishing.
4) Other prerequite
You need to be able to sign (GPG) your jars and upload the signature to Nexus.
Everything is prepared with
apply plugin: 'signing'But you need to have the infrastructure available on the build machine.
wing328 commentedon Mar 18, 2023
FYI. To sign the JAR, run the following:
where 3E99C7FD4C83EB0E56D5503678737DD36C998877 is the key name one can find from
gpg --list-key