We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8c05d2 commit 8b7a44fCopy full SHA for 8b7a44f
1 file changed
rewrite-csharp/build.gradle.kts
@@ -177,9 +177,11 @@ val csharpPublish by tasks.registering(Exec::class) {
177
}
178
179
180
-// Wire into the main publish task
181
-tasks.named("publish") {
182
- dependsOn(csharpPublish)
+// Wire into the main publish task only when the NuGet API key is available
+if (project.hasProperty("nugetApiKey")) {
+ tasks.named("publish") {
183
+ dependsOn(csharpPublish)
184
+ }
185
186
187
// ============================================
0 commit comments