From 6566fcec80e961f579f9ded0c28644060664a842 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 20:29:47 -0400 Subject: [PATCH] Publish only ZIP artifacts since the plugin has no xxx-client counterpart (#72) (#74) (cherry picked from commit ac484d34b45c940c33839a4bbd8f6cd40b00022f) Signed-off-by: Andriy Redko Signed-off-by: github-actions[bot] Co-authored-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() + } +}