Skip to content

Commit cb68d3f

Browse files
committed
ci: fix staging path
1 parent f25ed2c commit cb68d3f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

build.gradle.kts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ allprojects {
249249
group = "io.github.flaxoos"
250250
version = rootProject.version
251251
}
252-
253252
// see: https://jreleaser.org/guide/latest/examples/maven/maven-central.html#_portal_publisher_api
254253
jreleaser {
255254
// Configure the project
@@ -283,15 +282,22 @@ jreleaser {
283282
passphrase = jreleaserGpgPassphrase
284283
}
285284
deploy {
286-
val stagingDir = "target/staging-deploy"
285+
val stagingPath =
286+
layout.buildDirectory
287+
.dir("staging-deploy")
288+
.get()
289+
.asFile
290+
.apply { mkdirs() }
291+
.absolutePath
292+
287293
maven {
288294
mavenCentral {
289295
create(
290296
"release-deploy",
291297
closureOf<MavenCentralMavenDeployer> {
292298
active = RELEASE
293299
url = "https://central.sonatype.com/api/v1/publisher"
294-
stagingRepository(stagingDir)
300+
stagingRepository(stagingPath)
295301

296302
username = mcUsername
297303
password = mcPassword
@@ -313,7 +319,7 @@ jreleaser {
313319
snapshotSupported = true
314320
closeRepository = true
315321
releaseRepository = true
316-
stagingRepository(stagingDir)
322+
stagingRepository(stagingPath)
317323

318324
username = mcUsername
319325
password = mcPassword

0 commit comments

Comments
 (0)