diff --git a/.github/scripts/release-snapshot.sh b/.github/scripts/release-snapshot.sh index 5d8bad940..da4d0a8df 100755 --- a/.github/scripts/release-snapshot.sh +++ b/.github/scripts/release-snapshot.sh @@ -31,6 +31,8 @@ if [[ -e "build/publications/maven/module.json.asc" ]]; then cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-SNAPSHOT-javadoc.jar.asc" cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-SNAPSHOT-sources.jar.asc" cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-pdf-SNAPSHOT.jar.asc" + ls -l build/libs + ls -l plantuml-mit/build/libs cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-mit-SNAPSHOT.jar.asc" cp "plantuml-mit/build/libs/plantuml-mit-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-mit-SNAPSHOT-sources.jar.asc" fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18a145564..de3b60a80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,6 +146,8 @@ jobs: ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ARTIFACT_SIGNING_PASSPHRASE }} run: | gradle -i signMavenPublication signPdfJar + ls -l build/libs + ls -l plantuml-mit/build/libs - name: Get release version id: version run: | diff --git a/plantuml-mit/build.gradle.kts b/plantuml-mit/build.gradle.kts index 1eb63ed7e..4521301b1 100644 --- a/plantuml-mit/build.gradle.kts +++ b/plantuml-mit/build.gradle.kts @@ -157,3 +157,16 @@ publishing { } } } + +signing { + if (hasProperty("signing.gnupg.keyName") && hasProperty("signing.gnupg.passphrase")) { + useGpgCmd() + } else if (hasProperty("signingKey") && hasProperty("signingPassword")) { + val signingKey: String? by project + val signingPassword: String? by project + useInMemoryPgpKeys(signingKey, signingPassword) + } + if (hasProperty("signing.gnupg.passphrase") || hasProperty("signingPassword")) { + sign(publishing.publications["maven"]) + } +}