-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sbt
More file actions
45 lines (39 loc) · 1.63 KB
/
Copy pathpublish.sbt
File metadata and controls
45 lines (39 loc) · 1.63 KB
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
pomIncludeRepository := { _ => false }
publishMavenStyle := true
Test / publishArtifact := false
releaseCrossBuild := true
versionScheme := Some("semver-spec")
// -----------------------------------------------------------------------------
ThisBuild / sonatypeCredentialHost := Sonatype.sonatypeCentralHost
ThisBuild / publishTo := {
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
else localStaging.value
}
ThisBuild / credentials ++= (for {
username <- sys.env.get("SONATYPE_USERNAME")
password <- sys.env.get("SONATYPE_PASSWORD")
} yield Credentials("Sonatype Nexus Repository Manager", "central.sonatype.org", username, password))
// -----------------------------------------------------------------------------
releasePublishArtifactsAction := PgpKeys.publishSigned.value
// -----------------------------------------------------------------------------
releaseTagComment := s"Releasing ${(ThisBuild / version).value}"
releaseCommitMessage := s"Setting version to ${(ThisBuild / version).value}"
releaseNextCommitMessage := s"[ci skip] Setting version to ${(ThisBuild / version).value}"
// -----------------------------------------------------------------------------
import ReleaseTransformations.*
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
//releaseStepCommand("publishSigned"),
releaseStepCommand("sonaRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)