Skip to content

Commit

Permalink
Move to different publish plugin (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhov authored Nov 21, 2024
1 parent 3a6ad1e commit f2908f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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")
}
}
}
14 changes: 1 addition & 13 deletions buildSrc/src/main/groovy/blaze-query.java-conventions.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'maven-publish'
id 'com.diffplug.spotless'
}

Expand All @@ -27,7 +27,6 @@ publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)

pom {
licenses {
license {
Expand All @@ -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 {
Expand Down

0 comments on commit f2908f6

Please sign in to comment.