Skip to content

Commit 405fa67

Browse files
committed
Use sbt-ci-release
Signed-off-by: Carlos Quiroz <[email protected]>
1 parent 75e904e commit 405fa67

File tree

3 files changed

+40
-99
lines changed

3 files changed

+40
-99
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [master]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: olafurpg/setup-scala@v2
12+
- uses: olafurpg/setup-gpg@v2
13+
- name: Publish
14+
run: csbt ci-release
15+
env:
16+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
17+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
18+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
19+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 21 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,29 @@ Global / resolvers += Resolver.sonatypeRepo("public")
1515
lazy val downloadFromZip: TaskKey[Unit] =
1616
taskKey[Unit]("Download the tzdb tarball and extract it")
1717

18+
inThisBuild(
19+
List(
20+
organization := "io.github.cquiroz",
21+
homepage := Some(url("https://github.com/cquiroz/scala-java-time")),
22+
licenses := Seq("BSD 3-Clause License" -> url("https://opensource.org/licenses/BSD-3-Clause")),
23+
developers := List(
24+
Developer("cquiroz",
25+
"Carlos Quiroz",
26+
27+
url("https://github.com/cquiroz"))
28+
),
29+
scmInfo := Some(
30+
ScmInfo(
31+
url("https://github.com/cquiroz/scala-java-time"),
32+
"scm:git:[email protected]:cquiroz/scala-java-time.git"
33+
)
34+
)
35+
)
36+
)
37+
1838
lazy val commonSettings = Seq(
1939
description := "java.time API implementation in Scala and Scala.js",
2040
version := scalaJavaTimeVersion,
21-
organization := "io.github.cquiroz",
22-
homepage := Some(url("https://github.com/cquiroz/scala-java-time")),
23-
licenses := Seq("BSD 3-Clause License" -> url("https://opensource.org/licenses/BSD-3-Clause")),
2441
scalaVersion := scalaVer,
2542
crossScalaVersions := Seq("2.11.12", "2.12.10", "2.13.1"),
2643
// Don't include threeten on the binaries
@@ -37,18 +54,7 @@ lazy val commonSettings = Seq(
3754
},
3855
scalacOptions ++= Seq("-target:jvm-1.8", "-deprecation:false"),
3956
javaOptions ++= Seq("-Dfile.encoding=UTF8"),
40-
autoAPIMappings := true,
41-
publishArtifact in Test := false,
42-
publishMavenStyle := true,
43-
publishTo := {
44-
val nexus = "https://oss.sonatype.org/"
45-
if (isSnapshot.value)
46-
Some("snapshots".at(nexus + "content/repositories/snapshots"))
47-
else
48-
Some("releases".at(nexus + "service/local/staging/deploy/maven2"))
49-
},
50-
pomExtra := pomData,
51-
pomIncludeRepository := { _ => false }
57+
autoAPIMappings := true
5258
)
5359

5460
lazy val root = project
@@ -226,83 +232,3 @@ lazy val docs = project
226232
micrositeHighlightTheme := "color-brewer"
227233
)
228234

229-
lazy val pomData =
230-
<developers>
231-
<developer>
232-
<id>cquiroz</id>
233-
<name>Carlos Quiroz</name>
234-
<url>https://github.com/cquiroz</url>
235-
<roles>
236-
<role>Project Lead (current Scala version)</role>
237-
</roles>
238-
</developer>
239-
<developer>
240-
<id>soc</id>
241-
<name>Simon Ochsenreither</name>
242-
<url>https://github.com/soc</url>
243-
<roles>
244-
<role>Project Lead (original Scala version)</role>
245-
</roles>
246-
</developer>
247-
<developer>
248-
<id>jodastephen</id>
249-
<name>Stephen Colebourne</name>
250-
<url>https://github.com/jodastephen</url>
251-
<roles>
252-
<role>Project Lead (original Java implementation)</role>
253-
</roles>
254-
</developer>
255-
</developers>
256-
<contributors>
257-
<contributor>
258-
<name>Javier Fernandez-Ivern</name>
259-
<url>https://github.com/ivern</url>
260-
</contributor>
261-
<contributor>
262-
<name>Martin Baker</name>
263-
<url>https://github.com/kemokid</url>
264-
</contributor>
265-
<contributor>
266-
<name>Keith Harris</name>
267-
<url>https://github.com/keithharris</url>
268-
</contributor>
269-
<contributor>
270-
<name>Ludovic Hochet</name>
271-
<url>https://github.com/lhochet</url>
272-
</contributor>
273-
<contributor>
274-
<name>Matias Irland</name>
275-
<url>https://github.com/matir91</url>
276-
</contributor>
277-
<contributor>
278-
<name>Pap Lorinc</name>
279-
<url>https://github.com/paplorinc</url>
280-
</contributor>
281-
<contributor>
282-
<name>Philippe Marschall</name>
283-
<url>https://github.com/marschall</url>
284-
</contributor>
285-
<contributor>
286-
<name>Michael Nascimento Santos</name>
287-
<url>https://github.com/sjmisterm</url>
288-
</contributor>
289-
<contributor>
290-
<name>Roger Riggs</name>
291-
<url>https://github.com/RogerRiggs</url>
292-
</contributor>
293-
<contributor>
294-
<name>Siebe Schaap</name>
295-
<url>https://github.com/sschaap</url>
296-
</contributor>
297-
<contributor>
298-
<name>Sherman Shen</name>
299-
</contributor>
300-
<contributor>
301-
<name>Pavel Malyshev</name>
302-
<url>https://github.com/pamalyshev</url>
303-
</contributor>
304-
<contributor>
305-
<name>Philipp Thuerwaechter</name>
306-
<url>https://github.com/pithu</url>
307-
</contributor>
308-
</contributors>

project/plugins.sbt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.2")
22

3-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")
4-
5-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
6-
73
val scalaJSVersion =
84
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.32")
95

0 commit comments

Comments
 (0)