Skip to content

Commit

Permalink
configure signing if keys are available
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Obexer <[email protected]>
  • Loading branch information
cobexer committed Sep 10, 2024
1 parent 918acf7 commit 8ff9bf0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
id("maven-publish")
id("gradlebuild.git-version")
id("gradlebuild.zig")
id("signing")
}

group = "org.gradle.fileevents"
Expand Down Expand Up @@ -198,3 +199,15 @@ publishing {
}
}
}

signing {
useInMemoryPgpKeys(
System.getenv("PGP_SIGNING_KEY"),
System.getenv("PGP_SIGNING_KEY_PASSPHRASE")
)
if (!System.getenv("PGP_SIGNING_KEY_PASSPHRASE").isNullOrBlank()) {
publishing.publications.configureEach {
signing.sign(this)
}
}
}

0 comments on commit 8ff9bf0

Please sign in to comment.