File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name: Publish package
33on :
44 release :
55 types : [ created ]
6+
67jobs :
78 publish :
89
2122 env :
2223 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
2324 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
25+ GPG_KEY_ID : ${{ secrets.GPG_KEY_ID }}
26+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
27+ GPG_PRIVATE_KEY_PASSWORD : ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ plugins {
77 id ' io.spring.dependency-management' version ' 1.0.11.RELEASE'
88 id ' pl.allegro.tech.build.axion-release' version ' 1.12.1'
99 id ' io.github.gradle-nexus.publish-plugin' version ' 1.0.0'
10+ id ' signing'
1011}
1112
1213repositories {
@@ -63,6 +64,11 @@ test {
6364 }
6465}
6566
67+ java {
68+ withJavadocJar()
69+ withSourcesJar()
70+ }
71+
6672publishing {
6773 publications {
6874 mavenJava(MavenPublication ) {
@@ -107,4 +113,13 @@ nexusPublishing {
107113 maxRetries. set(15 )
108114 delayBetween. set(Duration . ofSeconds(5 ))
109115 }
116+ }
117+
118+ signing {
119+ useInMemoryPgpKeys(
120+ System . getenv(" GPG_KEY_ID" ),
121+ System . getenv(" GPG_PRIVATE_KEY" ),
122+ System . getenv(" GPG_PRIVATE_KEY_PASSWORD" )
123+ )
124+ sign publishing. publications. mavenJava
110125}
You can’t perform that action at this time.
0 commit comments