Skip to content

Commit

Permalink
build: explicitly make publish depend on signArchives
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jun 25, 2024
1 parent 61cf5e1 commit d07439a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ tasks.whenTaskAdded {
}
}

tasks.withType<PublishToMavenRepository>().configureEach() {
dependsOn("signArchives")
}

signing {
val signingKey: String = project.findProperty("signing.key") as String? ?: System.getenv("PGP_SIGNING_KEY")
val signingPassword: String = project.findProperty("signing.password") as String?
?: System.getenv("PGP_SIGNING_PASSWORD")
?: System.getenv("PGP_SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)

sign(configurations.getByName("archives"))
Expand Down

0 comments on commit d07439a

Please sign in to comment.