File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 40
40
env :
41
41
OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
42
42
OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
43
+ SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
44
+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
43
45
with :
44
46
arguments : publish closeAndReleaseStagingRepository
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5
5
6
6
val ossrhUsername: String? = System .getenv(" OSSRH_USERNAME" )
7
7
val ossrhPassword: String? = System .getenv(" OSSRH_PASSWORD" )
8
+ val signingKey: String? = System .getenv(" SIGNING_KEY" )
9
+ val signingPassword: String? = System .getenv(" SIGNING_PASSWORD" )
8
10
9
11
tasks.wrapper {
10
12
gradleVersion = " 7.1.1"
46
48
subprojects {
47
49
apply (plugin = " java-library" )
48
50
apply (plugin = " maven-publish" )
51
+ apply (plugin = " signing" )
49
52
50
53
configure<JavaPluginExtension > {
51
54
sourceCompatibility = javaVersion
@@ -149,6 +152,15 @@ subprojects {
149
152
}
150
153
}
151
154
}
155
+
156
+ configure<SigningExtension > {
157
+ isRequired = signingKey != " "
158
+
159
+ useInMemoryPgpKeys(signingKey, signingPassword)
160
+
161
+ val publishing: PublishingExtension by project.extensions
162
+ sign(publishing.publications)
163
+ }
152
164
}
153
165
154
166
nexusPublishing {
You can’t perform that action at this time.
0 commit comments