From 7156a4574630eaa6daccce2fa1c990c5a675cf0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Oct 2023 23:26:35 +0000 Subject: [PATCH] Publish only ZIP artifacts since the plugin has no xxx-client counterpart (#72) Signed-off-by: Andriy Redko (cherry picked from commit ac484d34b45c940c33839a4bbd8f6cd40b00022f) Signed-off-by: github-actions[bot] --- .github/workflows/check.yml | 5 ++++- build.gradle | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c1a8c67..f8d2f1c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,4 +18,7 @@ jobs: cache: gradle - name: Run Gradle (check) run: | - ./gradlew check \ No newline at end of file + ./gradlew check + - name: Run Gradle (assemble) + run: | + ./gradlew assemble diff --git a/build.gradle b/build.gradle index 7c6b384..ea123dc 100644 --- a/build.gradle +++ b/build.gradle @@ -87,7 +87,7 @@ allprojects { } publications { // add license information to generated poms - all { + pluginZip(MavenPublication) { publication -> pom { name = "opensearch-custom-codecs" description = "OpenSearch plugin that implements custom compression codecs" @@ -190,4 +190,13 @@ integTest { testClusters.integTest { testDistribution = "ARCHIVE" plugin(project.tasks.bundlePlugin.archiveFile) -} \ No newline at end of file +} + +tasks.withType(PublishToMavenRepository) { + def predicate = provider { + publication.name == "pluginZip" + } + onlyIf("Publishing only ZIP distributions") { + predicate.get() + } +}