Skip to content

Commit a8fcfac

Browse files
authored
Publish to com.dvdkly (#1)
* Enable automated release * Compile and test * Publish to com.dvdkly groupId
1 parent 94217b5 commit a8fcfac

File tree

4 files changed

+49
-44
lines changed

4 files changed

+49
-44
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
target
22
.idea
3+
4+
# Metals IDE specific
5+
project/metals.sbt
6+
.bloop
7+
.metals

.travis.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
language: scala
22

3-
scala:
4-
- 2.12.10
3+
before_install:
4+
- git fetch --tags
5+
6+
stages:
7+
- name: test
8+
- name: release
9+
if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork
10+
11+
jobs:
12+
include:
13+
- stage: test
14+
- name: compile and test
15+
script: sbt +compile +test
16+
# - name: formatting
17+
# script: ./bin/scalafmt --test
18+
- stage: release # Only runs if previous stages pass
19+
script: sbt ci-release

build.sbt

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ def scalacVersionOptions(scalaVersion: String) =
88
}
99

1010
lazy val commonSettings = Seq(
11-
organization := "io.github.howardjohn",
1211
scalaVersion := Scala212Version,
1312
crossScalaVersions := Seq(Scala212Version, Scala213Version),
14-
version := "0.4.0"
1513
)
1614

1715
lazy val root = project
@@ -20,14 +18,38 @@ lazy val root = project
2018
.settings(noPublishSettings)
2119
.aggregate(common, tests, http4s, http4sZio, akka, exampleHttp4s, exampleAkka)
2220

21+
inThisBuild(List(
22+
organization := "com.dvdkly",
23+
homepage := Some(url("https://github.com/kellydavid/scala-server-lambda")),
24+
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
25+
scmInfo := Some(
26+
ScmInfo(
27+
url("https://github.com/kellydavid/scala-server-lambda"),
28+
"scm:git@github.com:kellydavid/scala-server-lambda.git"
29+
)),
30+
developers := List(
31+
Developer(
32+
id = "howardjohn",
33+
name = "John Howard",
34+
email = "johnbhoward96@gmail.com",
35+
url = url("https://github.com/howardjohn/")
36+
),
37+
Developer(
38+
id = "kellydavid",
39+
name = "David Kelly",
40+
email = "kellydavid178@gmail.com",
41+
url = url("https://dvdkly.com")
42+
)
43+
)
44+
))
45+
2346
lazy val CirceVersion = "0.12.1"
2447
lazy val ScalaTestVersion = "3.1.0"
2548
lazy val Http4sVersion = "0.21.0-M5"
2649

2750
lazy val common = project
2851
.in(file("common"))
2952
.settings(commonSettings)
30-
.settings(publishSettings)
3153
.settings(
3254
moduleName := "scala-server-lambda-common",
3355
libraryDependencies ++=
@@ -41,7 +63,6 @@ lazy val common = project
4163
lazy val tests = project
4264
.in(file("tests"))
4365
.settings(commonSettings)
44-
.settings(publishSettings)
4566
.settings(
4667
moduleName := "scala-server-lambda-tests",
4768
libraryDependencies ++=
@@ -53,7 +74,6 @@ lazy val tests = project
5374

5475
lazy val http4s = project
5576
.in(file("http4s-lambda"))
56-
.settings(publishSettings)
5777
.settings(commonSettings)
5878
.settings(
5979
name := "http4s-lambda",
@@ -73,7 +93,6 @@ lazy val http4s = project
7393

7494
lazy val http4sZio = project
7595
.in(file("http4s-lambda-zio"))
76-
.settings(publishSettings)
7796
.settings(commonSettings)
7897
.settings(
7998
name := "http4s-lambda-zio",
@@ -96,7 +115,6 @@ lazy val http4sZio = project
96115

97116
lazy val akka = project
98117
.in(file("akka-http-lambda"))
99-
.settings(publishSettings)
100118
.settings(commonSettings)
101119
.settings(
102120
name := "akka-http-lambda",
@@ -141,38 +159,6 @@ lazy val exampleAkka = project
141159
.dependsOn(akka)
142160

143161
lazy val noPublishSettings = Seq(
144-
publish := {},
145-
publishLocal := {},
146-
publishArtifact := false
162+
skip in publish := true
147163
)
148164

149-
lazy val publishSettings = Seq(
150-
homepage := Some(url("https://github.com/howardjohn/scala-server-lambda")),
151-
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
152-
scmInfo := Some(
153-
ScmInfo(
154-
url("https://github.com/howardjohn/scala-server-lambda"),
155-
"scm:git@github.com:howardjohn/scala-server-lambda.git"
156-
)),
157-
developers := List(
158-
Developer(
159-
id = "howardjohn",
160-
name = "John Howard",
161-
email = "johnbhoward96@gmail.com",
162-
url = url("https://github.com/howardjohn/")
163-
)
164-
),
165-
credentials += Credentials(Path.userHome / ".sbt" / ".credentials"),
166-
publishMavenStyle := true,
167-
publishArtifact in Test := false,
168-
pomIncludeRepository := { _ =>
169-
false
170-
},
171-
publishTo := {
172-
val nexus = "https://oss.sonatype.org/"
173-
if (isSnapshot.value)
174-
Some("snapshots" at nexus + "content/repositories/snapshots")
175-
else
176-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
177-
}
178-
)

project/plugins.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
2-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
1+
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.0")

0 commit comments

Comments
 (0)