Skip to content

Commit 69fca53

Browse files
authored
use jreleaser to release to maven central (#301)
* use jreleaser to release to maven central * use jreleaser to release to maven central
1 parent 31e2ba6 commit 69fca53

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

build.gradle.kts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
`maven-publish`
55
signing
66
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
7+
id("org.jreleaser") version "1.22.0"
78
}
89

910
group = "uk.co.conoregan"
@@ -106,11 +107,29 @@ publishing {
106107
}
107108
repositories {
108109
maven {
109-
name = "OSSRH"
110-
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
111-
credentials {
112-
username = System.getenv("MAVEN_USERNAME")
113-
password = System.getenv("MAVEN_PASSWORD")
110+
url = uri(layout.buildDirectory.dir("staging-deploy"))
111+
}
112+
}
113+
}
114+
115+
jreleaser {
116+
signing {
117+
pgp {
118+
active = org.jreleaser.model.Active.ALWAYS
119+
armored = true
120+
mode = org.jreleaser.model.Signing.Mode.FILE
121+
publicKey = "C:/gpg/public.pgp"
122+
secretKey = "C:/gpg/private.pgp"
123+
}
124+
}
125+
deploy {
126+
maven {
127+
mavenCentral {
128+
create("sonatype") {
129+
active = org.jreleaser.model.Active.ALWAYS
130+
url.set("https://central.sonatype.com/api/v1/publisher")
131+
stagingRepository("build/staging-deploy")
132+
}
114133
}
115134
}
116135
}

0 commit comments

Comments
 (0)