Skip to content

Commit

Permalink
Merge pull request #2111 from mockito/mvn-central
Browse files Browse the repository at this point in the history
Enabled releases to Maven Central [ci maven-central-release]
  • Loading branch information
mockitoguy committed Nov 25, 2020
2 parents fde5abb + 3213b49 commit 98abe38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,6 @@ jobs:
- name: Build and publish
run: ./gradlew bintrayUpload githubRelease --scan
env:
MAVEN_CENTRAL_RELEASE: ${{contains(toJSON(github.event.commits.*.message), '[ci maven-central-release]')}}
GH_WRITE_TOKEN: ${{secrets.GH_WRITE_TOKEN}}
BINTRAY_API_KEY: ${{secrets.BINTRAY_API_KEY}}
2 changes: 1 addition & 1 deletion gradle/shipkit.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ext.mavenCentralRelease = shouldReleaseToCentral(project)
* To test this logic, run build with '-i' (info logging) and inspect the build output.
*/
static boolean shouldReleaseToCentral(project) {
boolean centralReleaseByCommit = System.getenv("TRAVIS_COMMIT_MESSAGE")?.contains("[ci maven-central-release]")
boolean centralReleaseByCommit = 'true' == System.getenv("MAVEN_CENTRAL_RELEASE")
boolean centralReleaseByProjectProperty = project.hasProperty("maven-central-release")
boolean centralRelease = centralReleaseByCommit || centralReleaseByProjectProperty
def message = """Bintray publish was using following settings:
Expand Down

0 comments on commit 98abe38

Please sign in to comment.