diff --git a/.github/workflows/publish-to-maven-central.yml b/.github/workflows/publish-to-maven-central.yml index 09e95e8..8537468 100644 --- a/.github/workflows/publish-to-maven-central.yml +++ b/.github/workflows/publish-to-maven-central.yml @@ -12,7 +12,7 @@ name: Publish package to the Maven Central Repository on: push: branches: [ "main" ] - #release: //TODO: change to this, only running at release + #release: //TODO: change to this, only running at release when fully tested #types: [created] jobs: publish: diff --git a/build.gradle b/build.gradle index 3b18f0f..4dc1aa5 100644 --- a/build.gradle +++ b/build.gradle @@ -172,7 +172,6 @@ publishing { } repositories { maven { - //name = "OSSRH" //these two lines did not work because dir() apparently asks for a local path //def releasesRepoUrl = layout.buildDirectory.dir('https://s01.oss.sonatype.org/content/repositories/releases/') //def snapshotsRepoUrl = layout.buildDirectory.dir('https://s01.oss.sonatype.org/content/repositories/snapshots/') @@ -185,12 +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, works locally - username = property("ossrhUsername") as String - password = property("ossrhPassword") as String + //uses keys and passwords declared in userhome/.gradle/gradle.properties + //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") as String - //password = System.getenv("MAVEN_PASSWORD") as String + username = System.getenv("MAVEN_USERNAME") as String + password = System.getenv("MAVEN_PASSWORD") as String } } }