-
Notifications
You must be signed in to change notification settings - Fork 3
/
ci-release.sbt
68 lines (64 loc) · 2.36 KB
/
ci-release.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
ThisBuild / scalaVersion := Dependencies.Versions.scala213
ThisBuild / crossScalaVersions := Seq(
Dependencies.Versions.scala213,
Dependencies.Versions.scala212,
Dependencies.Versions.scala3
)
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("17"))
ThisBuild / githubWorkflowBuildPreamble += WorkflowStep.Run(
commands = List("docker-compose up -d"),
name = Some("Create and start Docker containers")
)
ThisBuild / githubWorkflowBuildPreamble += WorkflowStep.Sbt(
List("scalafmtCheckAll", "scalafmtSbtCheck"),
name = Some("Check formatting")
)
ThisBuild / githubWorkflowBuildPostamble += WorkflowStep.Run(
commands = List("docker-compose down"),
name = Some("Stop and remove Docker resources")
)
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.Equals(Ref.Branch("master")))
ThisBuild / githubWorkflowPublish := Seq(
WorkflowStep.Sbt(
List("ciReleaseSonatype"),
name = Some("Publish artifacts"),
env = Map(
"SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}",
"SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"
)
)
)
ThisBuild / githubWorkflowPublishCond := Some("github.actor != 'mergify[bot]'")
ThisBuild / githubWorkflowPublishPreamble += WorkflowStep.Use(
ref = UseRef.Public("crazy-max", "ghaction-import-gpg", "v4"),
id = Some("import_gpg"),
name = Some("Import GPG key"),
params = Map("gpg_private_key" -> "${{ secrets.GPG_PRIVATE_KEY }}", "passphrase" -> "${{ secrets.PGP_PASS }}")
)
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
ThisBuild / developers := List(
Developer(
"janstenpickle",
"Chris Jansen",
"janstenpickle@users.noreply.github.com",
url = url("https://github.com/janstepickle")
),
Developer(
"catostrophe",
"λoλcat",
"catostrophe@users.noreply.github.com",
url = url("https://github.com/catostrophe")
)
)
ThisBuild / homepage := Some(url("https://github.com/trace4cats"))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/trace4cats/trace4cats-zipkin"),
"scm:git:git@github.com:trace4cats/trace4cats-zipkin.git"
)
)
ThisBuild / organization := "io.janstenpickle"
ThisBuild / organizationName := "trace4cats"