Skip to content

Commit 4b13460

Browse files
Fix CI builds (#85)
<!-- Please describe your pull request here. --> ## References - TODO <!-- References to relevant GitHub issues and pull requests, esp. upstream and downstream changes --> ## Submitter checklist - [ ] Recommended: Join [WireMock Slack](https://slack.wiremock.org/) to get any help in `#help-contributing` or a project-specific channel like `#wiremock-java` - [ ] Recommended: If you participate in Hacktoberfest 2023, make sure you're [signed up](https://wiremock.org/events/hacktoberfest/) there and in the WireMock form - [ ] The PR request is well described and justified, including the body and the references - [ ] The PR title represents the desired changelog entry - [ ] The repository's code style is followed (see the contributing guide) - [ ] Test coverage that demonstrates that the change works as expected - [ ] For new features, there's necessary documentation in this pull request or in a subsequent PR to [wiremock.org](https://github.com/wiremock/wiremock.org) <!-- Put an `x` into the [ ] to show you have filled the information. The template comes from https://github.com/wiremock/.github/blob/main/.github/pull_request_template.md You can override it by creating .github/pull_request_template.md in your own repository -->
1 parent e2732af commit 4b13460

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
- name: Run the Gradle package task
3535
uses: gradle/gradle-build-action@v2
3636
with:
37-
arguments: build check
37+
arguments: build check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ replay_pid*
2929
!gradle/wrapper/gradle-wrapper.jar
3030
build/
3131
.gradle/
32+
bin/

build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ signing {
8686
required {
8787
!version.toString().contains("SNAPSHOT") && (gradle.taskGraph.hasTask("uploadArchives") || gradle.taskGraph.hasTask("publish"))
8888
}
89-
def signingKey = providers.environmentVariable("OSSRH_GPG_SECRET_KEY").get()
90-
def signingPassphrase = providers.environmentVariable("OSSRH_GPG_SECRET_KEY_PASSWORD").get()
91-
useInMemoryPgpKeys(signingKey, signingPassphrase)
92-
sign(publishing.publications)
89+
def signingKey = providers.environmentVariable("OSSRH_GPG_SECRET_KEY").orElse(null)
90+
def signingPassphrase = providers.environmentVariable("OSSRH_GPG_SECRET_KEY_PASSWORD").orElse(null)
91+
if (signingKey != null && signingPassphrase != null) {
92+
useInMemoryPgpKeys(signingKey, signingPassphrase)
93+
sign(publishing.publications)
94+
}
9395
}
9496

9597
publishing {

0 commit comments

Comments
 (0)