Skip to content

Commit

Permalink
Github actions for release and publish to maven central.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Fuchs committed Apr 12, 2021
1 parent bc99219 commit d7baae0
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,23 @@ publishing {
// telling gradle to publish artifact to local directory (3)
repositories {
maven {
url "file:/${project.projectDir}/build/artifacts"
name = "Local"

def releasesRepoUrl = "file:/${project.projectDir}/build/artifacts/releases"
def snapshotsRepoUrl = "file:/${project.projectDir}/build/artifacts/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
maven {
name = "OSSRH"

def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl

credentials {
username = System.getenv("OSSRH_MAVEN_USERNAME")
password = System.getenv("OSSRH_MAVEN_PASSWORD")
}
}
// maven {
// name = "OSSRH"
//
// def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
// def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
//
// credentials {
// username = System.getenv("OSSRH_MAVEN_USERNAME")
// password = System.getenv("OSSRH_MAVEN_PASSWORD")
// }
// }
}
}

0 comments on commit d7baae0

Please sign in to comment.