From 18aa0d77202ad7b5cb38f7487c58819a7ec37e5f Mon Sep 17 00:00:00 2001 From: tiulpin Date: Wed, 3 Jul 2024 14:01:26 +0200 Subject: [PATCH] :bricks: Apply workaround for gradle publications issues --- .github/workflows/release.yml | 34 +++++++++++++++++++++++++++++++++- common/build.gradle.kts | 30 ------------------------------ 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 571602ac..75d346fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,39 @@ jobs: - name: Run linters and test run: ./gradlew clean :plugin:build :plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_TOKEN }} -PbuildNumber=${{ env.PATCH_VERSION }} - name: Publish JAR to Space - run: ./gradlew :common:publish + run: | + cat <> common/build.gradle.kts + publishing { + publications { + create("common") { + groupId = group.toString() + artifactId = "cli" + version = version.toString() + from(components["java"]) + artifact(tasks["jarSources"]) + pom { + url.set("https://github.com/JetBrains/qodana-action") + licenses { + license { + name.set("Apache-2.0") + url.set("https://github.com/JetBrains/qodana-action/blob/main/LICENSE") + } + } + } + } + } + repositories { + maven { + url = uri("https://packages.jetbrains.team/maven/p/sa/maven-public") + credentials { + username = System.getenv("JB_SPACE_INTELLIJ_CLIENT_ID") + password = System.getenv("JB_SPACE_INTELLIJ_CLIENT_SECRET") + } + } + } + } + EOF + ./gradlew :common:publish env: JB_SPACE_INTELLIJ_CLIENT_ID: ${{ secrets.MAVEN_SPACE_USERNAME }} JB_SPACE_INTELLIJ_CLIENT_SECRET: ${{ secrets.MAVEN_SPACE_PASSWORD }} diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 7b8e655f..3e05955c 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -37,33 +37,3 @@ tasks.register("jarSources") { archiveClassifier.set("sources") from(sourceSets.main.get().allSource) } - -publishing { - publications { - create("common") { - groupId = group.toString() - artifactId = "cli" - version = version.toString() - from(components["java"]) - artifact(tasks["jarSources"]) - pom { - url.set("https://github.com/JetBrains/qodana-action") - licenses { - license { - name.set("Apache-2.0") - url.set("https://github.com/JetBrains/qodana-action/blob/main/LICENSE") - } - } - } - } - } - repositories { - maven { - url = uri("https://packages.jetbrains.team/maven/p/sa/maven-public") - credentials { - username = System.getenv("JB_SPACE_INTELLIJ_CLIENT_ID") - password = System.getenv("JB_SPACE_INTELLIJ_CLIENT_SECRET") - } - } - } -} \ No newline at end of file