File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
developer-plugin/src/main
kotlin/com/github/minigdx/gradle/plugin
resources/github/workflows Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ import org.gradle.api.Plugin
14
14
import org.gradle.api.Project
15
15
import org.gradle.api.publish.PublishingExtension
16
16
import org.gradle.api.publish.maven.MavenPublication
17
- import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
18
- import org.gradle.jvm.tasks.Jar
17
+ import org.gradle.plugins.signing.Sign
19
18
import org.gradle.plugins.signing.SigningExtension
20
19
import org.gradle.util.GradleVersion
21
- import org.jetbrains.dokka.gradle.DokkaTask
22
20
import org.jetbrains.kotlin.gradle.plugin.extraProperties
23
21
import java.io.File
24
22
@@ -228,6 +226,10 @@ class MiniGdxDeveloperPlugin : Plugin<Project> {
228
226
project.tasks.named(RELEASE_TASK_NAME ).configure {
229
227
it.onlyIf { project.layout.buildDirectory.dir(" maven-central-portal" ).get().asFile.exists() }
230
228
}
229
+
230
+ project.tasks.withType(Sign ::class .java) {
231
+ it.onlyIf { project.properties[" signing.base64.secretKey" ] != null }
232
+ }
231
233
}
232
234
}
233
235
Original file line number Diff line number Diff line change 25
25
java-version : 17
26
26
27
27
- name : Publish artifact
28
- run : ./gradlew publishAllPublicationsToMavenCentralRepository -Pversion="${{github.event.release.tag_name}}" -Psigning.base64.secretKey="${{secrets.SIGNING_BASE_64_SECRET_KEY}}" -Psigning.password="${{secrets.SIGNING_PASSWORD}}" -PsonatypeUsername ="${{secrets.SONATYPE_USERNAME}}" -PsonatypePassword ="${{secrets.SONATYPE_PASSWORD}}"
28
+ run : ./gradlew publishAllPublicationToProjectLocalRepository zipMavenCentralPortalPublication releaseMavenCentralPortalPublication -Pversion="${{github.event.release.tag_name}}" -Psigning.base64.secretKey="${{secrets.SIGNING_BASE_64_SECRET_KEY}}" -Psigning.password="${{secrets.SIGNING_PASSWORD}}" -PcentralUsername ="${{secrets.SONATYPE_USERNAME}}" -PcentralPassword ="${{secrets.SONATYPE_PASSWORD}}"
You can’t perform that action at this time.
0 commit comments