diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 644342c7..9bda52eb 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -26,10 +26,18 @@ jobs: with: role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} aws-region: us-east-1 - - name: publish snapshots to maven + - name: publish snapshots zip to maven run: | export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) 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 + - name: publish snapshots jar to maven + run: | + export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) + 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 :geospatial-client:publishNebulaPublicationToSnapshotsRepository + diff --git a/CHANGELOG.md b/CHANGELOG.md index f9674cdf..3476ec05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on ho ### Bug Fixes ### Infrastructure - Github ci-runner Node.js issue fix ([#701](https://github.com/opensearch-project/geospatial/pull/701)) +- Github CI pipeline update to publish geospatial-client Jar ([#706](https://github.com/opensearch-project/geospatial/pull/706)) ### Documentation ### Maintenance ### Refactoring diff --git a/client/build.gradle b/client/build.gradle index 582c6640..0b53f089 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -55,6 +55,16 @@ spotless { } publishing { + repositories { + maven { + name = "Snapshots" + url = "https://aws.oss.sonatype.org/content/repositories/snapshots" + credentials { + username "$System.env.SONATYPE_USERNAME" + password "$System.env.SONATYPE_PASSWORD" + } + } + } publications { pluginZip(MavenPublication) { publication -> pom {