Skip to content

Commit

Permalink
build: publish snapshots to sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Nov 14, 2019
1 parent 351c645 commit c4a15af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
script: "./gradlew spotlessCheck check jacocoTestReport"
if: type = pull_request
- stage: build master
script: "./gradlew spotlessCheck check jacocoTestReport uploadArchives"
script: "./gradlew spotlessCheck check jacocoTestReport publish"
if: branch = master AND NOT type = pull_request
- stage: build and stage release
if: branch =~ /release/
Expand Down
7 changes: 3 additions & 4 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ nexusPublishing {

signing {
sign publishing.publications.maven
if(!version.endsWith('SNAPSHOT')) {
def signingKey = new File("$rootDir/web3j.asc").getText('UTF-8')
def signingPassword = System.getenv('GPG_PASSPHRASE')
useInMemoryPgpKeys(signingKey, signingPassword)
def signingKey = new File("$rootDir/web3j.asc")
if(signingKey.exists()) {
useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE'))
}
}

0 comments on commit c4a15af

Please sign in to comment.