-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
83 lines (77 loc) · 2.31 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
inThisBuild(
List(
organization := "ca.dvgi",
homepage := Some(url("https://github.com/dvgica/healthful")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
description := "A low-dependency HTTP health check server for Scala",
developers := List(
Developer(
"dvgica",
"David van Geest",
url("http://dvgi.ca")
)
)
)
)
val scala212Version = "2.12.20"
val scala213Version = "2.13.15"
val scala3Version = "3.3.4"
val scalaVersions =
Seq(
scala213Version,
scala212Version,
scala3Version
)
def subproject(name: String) = Project(
id = name,
base = file(name)
).settings(
scalaVersion := scala213Version,
crossScalaVersions := scalaVersions,
libraryDependencies += "org.scalameta" %% "munit" % "1.0.3" % Test,
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
)
lazy val healthful = subproject("healthful")
.settings(
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "2.0.16",
"com.typesafe" % "config" % "1.4.3",
"org.scalameta" %% "munit" % "1.0.3" % Test,
"com.softwaremill.sttp.client3" %% "core" % "3.10.1" % Test
)
)
lazy val root = project
.in(file("."))
.aggregate(
healthful
)
.settings(
publish / skip := true,
crossScalaVersions := Nil,
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
)
ThisBuild / crossScalaVersions := scalaVersions
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
ThisBuild / githubWorkflowBuildPreamble := Seq(
WorkflowStep.Sbt(
List("scalafmtCheckAll", "scalafmtSbtCheck"),
name = Some("Check formatting with scalafmt")
)
)
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches :=
Seq(RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ci-release"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)