diff --git a/build.gradle b/build.gradle index 2fd682b..1f345ed 100644 --- a/build.gradle +++ b/build.gradle @@ -184,19 +184,12 @@ publishing { //after publishing, go to https://s01.oss.sonatype.org, log in, close the staged repo, and release it if everything worked out url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" credentials { - //uses keys and passwords declared in userhome/.gradle/gradle.properties - if (System.getenv("ossrhUsername") != null) { - username = System.getenv("ossrhUsername") as String - } else { - username = property("ossrhUsername") as String - } - //username = (System.getenv("ossrhUsername") ?: property("ossrhUsername")) as String - if (System.getenv("ossrhPassword") != null) { - password = System.getenv("ossrhPassword") as String - } else { - password = property("ossrhPassword") as String - } - //password = (System.getenv("ossrhPassword") ?: property("ossrhPassword")) as String + //uses keys and passwords declared in userhome/.gradle/gradle.properties, works locally + //username = property("ossrhUsername") as String + //password = property("ossrhPassword") as String + //uses environment variables declared in yml file which passes GitHub secrets to it + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") } } }