Skip to content

Commit

Permalink
Use sbt-sonatype plugin for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
lomigmegard committed May 23, 2020
1 parent ac7bd83 commit 9126c1e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 33 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ sbt -v --java-home /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents
> + test
> project akka-http-cors
> + publishSigned
> sonatypeBundleRelease
```
46 changes: 13 additions & 33 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,28 @@ lazy val commonSettings = Seq(
"-Ywarn-numeric-widen",
"-Ywarn-unused",
),
homepage := Some(url("https://github.com/lomigmegard/akka-http-cors")),
licenses := Seq("Apache 2" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(
ScmInfo(
url("https://github.com/lomigmegard/akka-http-cors"),
"scm:[email protected]:lomigmegard/akka-http-cors.git"
)
),
developers := List(
Developer(id="lomigmegard", name="Lomig Mégard", email="", url=url("https://lomig.ch"))
),
)

lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := 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")
},

pomExtra := {
<url>https://github.com/lomigmegard/akka-http-cors</url>
<licenses>
<license>
<name>Apache 2</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<url>git@github.com:lomigmegard/akka-http-cors.git</url>
<connection>scm:git:git@github.com:lomigmegard/akka-http-cors.git</connection>
</scm>
<developers>
<developer>
<id>lomigmegard</id>
<name>Lomig Mégard</name>
<url>https://lomig.ch</url>
</developer>
</developers>
},
publishTo := sonatypePublishToBundle.value,
)

lazy val dontPublishSettings = Seq(
//publishSigned := (()),
publish := (()),
publishLocal := (()),
publishArtifact := false,
skip in publish := true,
)

lazy val root = (project in file("."))
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")

0 comments on commit 9126c1e

Please sign in to comment.