diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52d1265..6ef77b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,13 @@ jobs: git add gradle.properties git commit -m "Set version to $VERSION" git tag -a $VERSION -m "Release $VERSION" - ./gradlew publish :incrementVersion --no-daemon + ./gradlew publishToSonatype --no-daemon + ./gradlew :incrementVersion --no-daemon git add gradle.properties git commit -m "Update to next development version" + git push git push --tags + ./gradlew closeAndReleaseSonatypeStagingRepository env: VERSION: ${{ inputs.version }} OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/build.gradle b/build.gradle index 1c78e6e..35de673 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,13 @@ plugins { + id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' id 'incrementVersion' +} + +nexusPublishing { + repositories { + sonatype { + username = System.getenv("OSSRH_USERNAME") + password = System.getenv("OSSRH_PASSWORD") + } + } } \ No newline at end of file diff --git a/buildSrc/src/main/groovy/blaze-query.java-conventions.gradle b/buildSrc/src/main/groovy/blaze-query.java-conventions.gradle index 257cfaf..2f1a82f 100644 --- a/buildSrc/src/main/groovy/blaze-query.java-conventions.gradle +++ b/buildSrc/src/main/groovy/blaze-query.java-conventions.gradle @@ -1,7 +1,7 @@ plugins { id 'java-library' - id 'maven-publish' id 'signing' + id 'maven-publish' id 'com.diffplug.spotless' } @@ -27,7 +27,6 @@ publishing { publications { mavenJava(MavenPublication) { from(components.java) - pom { licenses { license { @@ -42,17 +41,6 @@ publishing { } } } - - repositories { - maven { - name = "OSSRH" - url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - credentials { - username = System.getenv("OSSRH_USERNAME") - password = System.getenv("OSSRH_PASSWORD") - } - } - } } tasks.withType(JavaCompile).configureEach {