Skip to content

Commit 8b7a44f

Browse files
nugetApiKey check (#6887)
1 parent b8c05d2 commit 8b7a44f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

rewrite-csharp/build.gradle.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,11 @@ val csharpPublish by tasks.registering(Exec::class) {
177177
}
178178
}
179179

180-
// Wire into the main publish task
181-
tasks.named("publish") {
182-
dependsOn(csharpPublish)
180+
// Wire into the main publish task only when the NuGet API key is available
181+
if (project.hasProperty("nugetApiKey")) {
182+
tasks.named("publish") {
183+
dependsOn(csharpPublish)
184+
}
183185
}
184186

185187
// ============================================

0 commit comments

Comments
 (0)