-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
executable file
·80 lines (69 loc) · 2.84 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
import Settings.*
import sbtghactions.JavaSpec.Distribution
import xerial.sbt.Sonatype.*
val versionV = "0.0.3"
ThisBuild / version := versionV
ThisBuild / scalaVersion := Versions.dotty
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("release")))
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec(Distribution.Adopt, "17"))
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(List("compile"))
)
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("release"),
env = Map(
"PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}",
"PGP_SECRET" -> "${{ secrets.PGP_SECRET }}",
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.getOrElse("SONATYPE_USERNAME", ""),
sys.env.getOrElse("SONATYPE_PASSWORD", ""))
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/vlmiroshnikov/saga"), "git@github.com:vlmiroshnikov/saga.git")
)
ThisBuild / developers ++= List(
"vlmiroshnikov" -> "Vyacheslav Miroshnikov"
).map {
case (username, fullName) =>
Developer(username, fullName, s"@$username", url(s"https://github.com/$username"))
}
ThisBuild / organization := "io.github.vlmiroshnikov"
ThisBuild / organizationName := "vlmiroshnikov"
lazy val release = taskKey[Unit]("Release")
addCommandAlias("release", "; reload; project /; publishSigned; sonatypeBundleRelease")
def publishSettings = Seq(
sonatypeProfileName := "io.github.vlmiroshnikov",
publishMavenStyle := true,
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")),
sonatypeProjectHosting := Some(GitHubHosting("vlmiroshnikov", "saga", "vlmiroshnikov@gmail.com")),
homepage := Some(url("https://github.com/vlmiroshnikov/saga")),
publishTo := sonatypePublishToBundle.value,
useGpgPinentry := Option(System.getenv("PGP_PASSPHRASE")).isDefined
)
lazy val saga = project
.in(file("."))
.settings(scalaVersion := Versions.dotty)
.aggregate(`saga-core`)
.settings(
publish := {},
publishLocal := {},
publishArtifact := false,
publish / skip := true
)
lazy val `saga-core` = project
.in(file("saga-core"))
.settings(
name := "saga-core",
scalaVersion := Versions.dotty,
libraryDependencies ++= cats ++ catsEffect ++ munit ++ munitEffect
)
.settings(publishSettings)