Skip to content

Commit

Permalink
chore(java-client): publish java client to central maven repository d…
Browse files Browse the repository at this point in the history
…irectly
  • Loading branch information
h4rikris committed Jun 29, 2021
1 parent 0487223 commit 23757e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Publish java client
run: |
printf "$GPG_SIGNING_KEY" | base64 --decode > private.key
./gradlew clean publish -Psigning.keyId=${GPG_SIGNING_KEY_ID} -Psigning.password=${GPG_SIGNING_PASSWORD} -Psigning.secretKeyRingFile=private.key --console=verbose
./gradlew clean publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${GPG_SIGNING_KEY_ID} -Psigning.password=${GPG_SIGNING_PASSWORD} -Psigning.secretKeyRingFile=private.key --console=verbose
working-directory: clients/java
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
12 changes: 12 additions & 0 deletions clients/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
id 'com.google.protobuf' version '0.8.15'
id 'io.freefair.lombok' version '5.3.3.3'
id 'com.palantir.git-version' version '0.12.3'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}

group 'io.odpf'
Expand Down Expand Up @@ -107,3 +108,14 @@ publishing {
signing {
sign publishing.publications.maven
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}

0 comments on commit 23757e3

Please sign in to comment.