Skip to content

Commit

Permalink
Merge pull request #739 from armanbilge/issue/735
Browse files Browse the repository at this point in the history
Disable CI snapshots if publishing to Central host
  • Loading branch information
armanbilge authored Sep 6, 2024
2 parents b48f58e + dbd53fa commit 131c783
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion core/src/main/scala/org/typelevel/sbt/TypelevelPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import de.heikoseeberger.sbtheader.HeaderPlugin
import org.typelevel.sbt.gha.GenerativePlugin
import org.typelevel.sbt.gha.GitHubActionsPlugin
import sbt._
import xerial.sbt.Sonatype

import Keys._
import TypelevelKernelPlugin.autoImport._
Expand Down Expand Up @@ -48,8 +49,10 @@ object TypelevelPlugin extends AutoPlugin {
import TypelevelCiPlugin.autoImport._
import TypelevelSettingsPlugin.autoImport._
import TypelevelSonatypeCiReleasePlugin.autoImport._
import TypelevelVersioningPlugin.autoImport._
import GenerativePlugin.autoImport._
import GitHubActionsPlugin.autoImport._
import Sonatype.autoImport._

override def buildSettings = Seq(
organization := "org.typelevel",
Expand All @@ -64,7 +67,14 @@ object TypelevelPlugin extends AutoPlugin {
licenses += License.Apache2,
tlCiHeaderCheck := true,
tlCiScalafmtCheck := true,
tlCiReleaseBranches := Seq("main"),
tlCiReleaseBranches := {
val central =
sonatypeCredentialHost.value.equalsIgnoreCase(Sonatype.sonatypeCentralHost)
if (central && tlUntaggedAreSnapshots.value)
Seq() // Sonatype Central does not support snapshots
else
Seq("main")
},
Def.derive(tlFatalWarnings := githubIsWorkflowBuild.value),
githubWorkflowJavaVersions := {
Seq(JavaSpec.temurin(tlJdkRelease.value.getOrElse(8).toString))
Expand Down

0 comments on commit 131c783

Please sign in to comment.