Skip to content

Commit 79ef0be

Browse files
committed
release workflow updated
1 parent f8c2d89 commit 79ef0be

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Publish package
33
on:
44
release:
55
types: [ created ]
6+
67
jobs:
78
publish:
89

@@ -21,3 +22,6 @@ jobs:
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 }}

build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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

1213
repositories {
@@ -63,6 +64,11 @@ test {
6364
}
6465
}
6566

67+
java {
68+
withJavadocJar()
69+
withSourcesJar()
70+
}
71+
6672
publishing {
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
}

0 commit comments

Comments
 (0)