diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index aabc13d..6c30bcf 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -36,9 +36,5 @@ jobs: export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) echo "::add-mask::$SONATYPE_USERNAME" echo "::add-mask::$SONATYPE_PASSWORD" - # For JS-SPI jar - ./gradlew publishShadowPublicationToSnapshotsRepository - # For JS jar - ./gradlew publishNebulaPublicationToSnapshotsRepository # For JS plugin zip ./gradlew publishPluginZipPublicationToSnapshotsRepository diff --git a/build.gradle b/build.gradle index a9028bd..59486bc 100644 --- a/build.gradle +++ b/build.gradle @@ -81,6 +81,37 @@ publishing { } } } + publications { + pluginZip(MavenPublication) { publication -> + pom { + name = pluginName + description = pluginDescription + groupId = "org.opensearch.plugin" + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + developers { + developer { + name = "OpenSearch" + url = "https://github.com/opensearch-project/opensearch-plugin-template-java" + } + } + } + } + } + repositories { + maven { + name = "Snapshots" + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } } checkstyle {