forked from sbt/sbt-paradox-material-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.sbt
46 lines (45 loc) · 1.47 KB
/
publish.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
val repo = new {
val org = "jonas"
val name = "paradox-material-theme"
val path = org + "/" + name
}
inThisBuild(Def.settings(
organization := "io.github.jonas",
licenses += "MIT" -> url("https://github.com/jonas/paradox-material-theme/blob/master/LICENSE"),
homepage := Some(url(s"https://${repo.org}.github.io/${repo.name}")),
scmInfo := Some(
ScmInfo(
url(s"https://github.com/${repo.path}"),
s"scm:git:[email protected]:${repo.path}.git"
)
),
developers := List(
Developer("jonas", "Jonas Fonseca", "[email protected]", url("https://github.com/jonas"))
),
// Workaround NPE when publishing: https://github.com/sbt/sbt/issues/3519
updateOptions := updateOptions.value.withGigahorse(false),
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials ++= (
for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
} yield Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
username,
password
)
).toSeq,
versionWithGit,
git.useGitDescribe := true,
git.remoteRepo := s"[email protected]:${repo.path}.git"
))