Skip to content

Commit

Permalink
Add configuration for publishing snapshot (#90) (#92)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7966198)

Signed-off-by: Chenyang Ji <[email protected]>
  • Loading branch information
ansjcy authored Sep 4, 2024
1 parent 95553ca commit 0f08e07
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 31 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0f08e07

Please sign in to comment.