Skip to content

Commit 6891d93

Browse files
committed
Added a way to disable required signing on CI
1 parent fb70066 commit 6891d93

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/build-verification.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
uses: gradle/actions/setup-gradle@v4
3838
with:
3939
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
40-
- name: Disable signing on CI
41-
run: sed -i 's/isRequired = providers.environmentVariable("CI").isPresent/isRequired = false/' build.gradle.kts
4240
- name: Publish to maven local
43-
id: publish_to_maven_local
41+
id: publish-to-maven-local
4442
run: ./gradlew clean publishToMavenLocal -Dgradle.cache.remote.push=false
43+
env:
44+
DISABLE_REQUIRED_SIGNING: true
4545
- name: Modify the project to use the locally published plugin
4646
run: |
4747
sed -i '1i\
@@ -55,5 +55,5 @@ jobs:
5555
sed -i -E 's/(id\("com.gradle.common-custom-user-data-gradle-plugin"\) version )"2[0-9\.]*"/\1"2+"/' settings.gradle.kts
5656
5757
- name: Run a build with the locally published plugin
58-
id: build_with_local_plugin
58+
id: build-with-local-plugin
5959
run: ./gradlew clean build -i -Dgradle.cache.remote.push=false

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ You may also remove `plugin-publish` and `signing` from the `plugins {}` block a
9191

9292
signing {
9393
// Require publications to be signed on CI. Otherwise, publication will be signed only if keys are provided.
94-
isRequired = providers.environmentVariable("CI").isPresent
94+
isRequired = providers.environmentVariable("CI").isPresent &&
95+
providers.environmentVariable("DISABLE_REQUIRED_SIGNING").isPresent.not()
9596

9697
useInMemoryPgpKeys(
9798
providers.environmentVariable("PGP_SIGNING_KEY").orNull,

0 commit comments

Comments
 (0)