From 792e11d5ff4ff48bf21ef161d3edab865055f534 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Tue, 9 Dec 2025 18:15:31 +0100 Subject: [PATCH] chore: Publish to new nightly --- project/Build.scala | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index ec970db35ba4..c382751cde09 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -281,13 +281,6 @@ object Build { // I find supershell more distracting than helpful useSuperShell := false, - // Credentials to release to Sonatype - credentials ++= ( - for { - username <- sys.env.get("SONATYPE_USER") - password <- sys.env.get("SONATYPE_PW") - } yield Credentials("Sonatype Nexus Repository Manager", "central.sonatype.com", username, password) - ).toList, PgpKeys.pgpPassphrase := sys.env.get("PGP_PW").map(_.toCharArray()), PgpKeys.useGpgPinentry := true, @@ -1929,10 +1922,27 @@ object Build { publishMavenStyle := true, isSnapshot := version.value.contains("SNAPSHOT"), publishTo := { - val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" - if (isSnapshot.value) Some("central-snapshots" at centralSnapshots) - else localStaging.value + if (sys.env.get("NEWNIGHTLY").contains("yes")) { + Some(sys.env("MAVEN_REPOSITORY_REALM") at sys.env("MAVEN_REPOSITORY_URL")) + } else if (isSnapshot.value) { + Some("central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/") + } else + localStaging.value }, + credentials ++= ( + if (sys.env.get("NEWNIGHTLY").contains("yes")) { + for { + username <- sys.env.get("MAVEN_REPOSITORY_USER") + token <- sys.env.get("MAVEN_REPOSITORY_TOKEN") + } yield Credentials(sys.env("MAVEN_REPOSITORY_REALM"), sys.env("MAVEN_REPOSITORY_HOST"), username, token) + } + else + for { + username <- sys.env.get("SONATYPE_USER") + password <- sys.env.get("SONATYPE_PW") + } yield Credentials("Sonatype Nexus Repository Manager", "central.sonatype.com", username, password) + + ).toList, publishConfiguration ~= (_.withOverwrite(true)), publishLocalConfiguration ~= (_.withOverwrite(true)), projectID ~= {id =>