Skip to content

Commit

Permalink
Merge pull request #411 from mockito/mockitoguy-patch-2
Browse files Browse the repository at this point in the history
Enabled releases to Maven Central
  • Loading branch information
mockitoguy authored Mar 22, 2021
2 parents a146ed7 + 6c7aeaf commit 3850c83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
java-version: 8

- name: Build and release
run: ./gradlew githubRelease publishToSonatype # closeAndReleaseStagingRepository
run: ./gradlew githubRelease publishToSonatype closeAndReleaseStagingRepository
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NEXUS_TOKEN_USER: ${{secrets.NEXUS_TOKEN_USER}}
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ tasks.named("githubRelease") {
githubToken = System.getenv("GITHUB_TOKEN")
newTagRevision = System.getenv("GITHUB_SHA")
releaseTag = project.version
releaseName = project.version
}

nexusPublishing {
repositories {
if (System.getenv("NEXUS_TOKEN_PWD")) {
sonatype {
sonatype { // Publishing to: https://s01.oss.sonatype.org (faster instance)
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")

username = System.getenv("NEXUS_TOKEN_USER")
password = System.getenv("NEXUS_TOKEN_PWD")
}
Expand Down

0 comments on commit 3850c83

Please sign in to comment.