Skip to content

Commit

Permalink
Set up sbt-ci-release and Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf committed Jan 29, 2021
1 parent 352db12 commit 4907de1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 17 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v5
- uses: olafurpg/setup-scala@v10
- run: sbt +test
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
23 changes: 10 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ scalaVersion in ThisBuild := "2.13.3"

crossScalaVersions in ThisBuild := Seq(scalaVersion.value, "2.12.8")



val library =
crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
Expand All @@ -18,19 +20,14 @@ val library =
"org.scalatestplus" %%% "scalacheck-1-15" % "3.2.3.0" % Test,
"com.typesafe.play" %%% "play-json" % "2.9.2"
),
publishTo := {
val nexus = "https://oss.sonatype.org"
if (isSnapshot.value) Some("snapshots" at s"$nexus/content/repositories/snapshots")
else Some("releases" at s"$nexus/service/local/staging/deploy/maven2")
},
pomExtra :=
<developers>
<developer>
<id>julienrf</id>
<name>Julien Richard-Foy</name>
<url>http://julien.richard-foy.fr</url>
</developer>
</developers>,
developers := List(
Developer(
"julienrf",
"Julien Richard-Foy",
"[email protected]",
url("http://julien.richard-foy.fr")
)
),
homepage := Some(url(s"https://github.com/julienrf/${name.value}")),
licenses := Seq("MIT License" -> url("http://opensource.org/licenses/mit-license.php")),
scmInfo := Some(
Expand Down
6 changes: 2 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.5.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0")

addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")

0 comments on commit 4907de1

Please sign in to comment.