$ sbt "set pgpReadOnly := false" "pgp-cmd gen-key"
build.sbt:
pgpSecretRing in Global := file("secring.gpg")
pgpPublicRing in Global := file("pubring.gpg")
organization in Global := "com.github.bla"
pomExtra := {
<url>https://github.com/renesca/renesca</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<url>https://github.com/renesca/renesca</url>
<connection>scm:git:git@github.com:renesca/renesca.git</connection>
</scm>
<developers>
<developer>
<id>fdietze</id>
<name>Felix Dietze</name>
<url>https://github.com/fdietze</url>
</developer>
<developer>
<id>snordquist</id>
<name>Sascha Nordquist</name>
<url>https://github.com/snordquist</url>
</developer>
<developer>
<id>jkaroff</id>
<name>Johannes Karoff</name>
<url>https://github.com/cornerman</url>
</developer>
</developers>
}
plugins.sbt
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
sonatype.sbt
import com.typesafe.sbt.SbtPgp._
// this has to go in an sbt file because if we use an external
// credentials properties file it ignores it
credentials in Global += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
"felixdz",
"**********"
)
pgpPassphrase in Global := Some("".toCharArray)
$ sbt publishSigned
TODO