Skip to content

Commit e3cd3a6

Browse files
committed
Added task publishToMavenCentral but it seems NOT to work
1 parent 7a46250 commit e3cd3a6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ allprojects {
3636
inputs.property("ENV:TZ", providers.environmentVariable("TZ")).optional(true)
3737
}
3838
}
39+
40+
tasks.register("publishToMavenCentral", Exec) {
41+
// subprojects.each { dependsOn("${it.name}:publish") }
42+
group = "Publishing"
43+
description = "Publishes all publications in this project " +
44+
"and announces publication to central.sonatype.com."
45+
commandLine './signalPublishToCentralSonatype.sh', project.portalTokenBase64
46+
}

signalPublishToCentralSonatype.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
token=$1
3+
echo "Posting new deployment to ossrh-staging.api.central"
4+
curl -X 'POST' \
5+
'https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/net.jqwik' \
6+
-H 'accept: application/json' \
7+
-H 'Authorization: $token'

0 commit comments

Comments
 (0)