Skip to content

Commit

Permalink
Add publication of jars workflow. (#764)
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
(cherry picked from commit 22b66d5)
  • Loading branch information
Yury-Fridlyand authored and github-actions[bot] committed Mar 2, 2023
1 parent 46e9747 commit 922b47b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ 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"
./gradlew publishPluginZipPublicationToSnapshotsRepository
./gradlew publishPluginZipPublicationToSnapshotsRepository publishJarsPublicationToSnapshotsRepository
36 changes: 36 additions & 0 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ publishing {
name = 'staging'
url = "${rootProject.buildDir}/local-staging-repo"
}
maven {
name = "Snapshots"
url = "https://aws.oss.sonatype.org/content/repositories/snapshots"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
}
}
}
publications {
shadow(MavenPublication) { publication ->
Expand Down Expand Up @@ -100,6 +108,34 @@ publishing {
}
}
}
jars(MavenPublication) { publication ->
from components.java

pom {
name = "OpenSearch Machine Learning Client"
packaging = "jar"
url = "https://github.com/opensearch-project/ml-commons"
description = "OpenSearch Machine Learning Client"
scm {
connection = "scm:[email protected]:opensearch-project/ml-commons.git"
developerConnection = "scm:[email protected]:opensearch-project/ml-commons.git"
url = "[email protected]:opensearch-project/ml-commons.git"
}
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/ml-commons"
}
}
}
}

}

}
Expand Down

0 comments on commit 922b47b

Please sign in to comment.