Skip to content

Commit f64804f

Browse files
committed
Switch to sbt-ci-release
1 parent 13a9b09 commit f64804f

File tree

8 files changed

+51
-54
lines changed

8 files changed

+51
-54
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,26 @@ name: CI
33
on:
44
pull_request:
55
push:
6+
branches:
7+
- '**'
8+
tags-ignore:
9+
- v*.*.*
610

711
jobs:
12+
813
ci:
14+
name: Scala v${{ matrix.scala }} / Java v${{ matrix.java }}
915
runs-on: ubuntu-latest
16+
1017
strategy:
1118
matrix:
1219
include:
1320
- java: 14
1421
scala: 2
1522
- java: 8
1623
scala: 3
17-
name: Scala v${{ matrix.scala }} / Java v${{ matrix.java }}
18-
steps:
1924

25+
steps:
2026
- name: Git checkout
2127
uses: actions/checkout@v3
2228

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*.*.*
7+
8+
jobs:
9+
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: Git checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Scala
18+
uses: japgolly/setup-everything-scala@v3.1
19+
20+
- name: Release
21+
run: sbt ci-release
22+
env:
23+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
24+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
25+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
26+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ThisBuild / licenses += ("Apache-2.0", url("http://opensource.org/licenses/
44
ThisBuild / shellPrompt := ((s: State) => Project.extract(s).currentRef.project + "> ")
55
ThisBuild / versionScheme := Some("early-semver")
66

7+
sonatypeProfileName := "com.github.japgolly"
8+
79
val root = Microlibs.root
810
val rootJVM = Microlibs.rootJVM
911
val rootJS = Microlibs.rootJS

project/Build.scala

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
55
import pl.project13.scala.sbt.JmhPlugin
66
import sbtcrossproject.CrossPlugin.autoImport._
77
import scalajscrossproject.ScalaJSCrossPlugin.autoImport._
8-
import sbtrelease.ReleasePlugin.autoImport._
98
import Lib._
109

1110
object Microlibs {
@@ -42,18 +41,15 @@ object Microlibs {
4241

4342
val commonSettings = ConfigureBoth(
4443
_.settings(
45-
scalaVersion := Ver.scala2,
46-
crossScalaVersions := Seq(Ver.scala2, Ver.scala3),
47-
scalacOptions ++= scalacCommonFlags,
48-
scalacOptions ++= scalac2Flags.filter(_ => scalaVersion.value.startsWith("2")),
49-
scalacOptions ++= scalac3Flags.filter(_ => scalaVersion.value.startsWith("3")),
50-
Test / scalacOptions --= Seq("-Ywarn-dead-code"),
51-
testFrameworks := Nil,
52-
updateOptions := updateOptions.value.withCachedResolution(true),
53-
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
54-
releaseTagComment := s"v${(ThisBuild / version).value}",
55-
releaseVcsSign := true,
56-
libraryDependencies ++= Seq(Dep.kindProjector).filterNot(_ => scalaVersion.value.startsWith("3")),
44+
scalaVersion := Ver.scala2,
45+
crossScalaVersions := Seq(Ver.scala2, Ver.scala3),
46+
scalacOptions ++= scalacCommonFlags,
47+
scalacOptions ++= scalac2Flags.filter(_ => scalaVersion.value.startsWith("2")),
48+
scalacOptions ++= scalac3Flags.filter(_ => scalaVersion.value.startsWith("3")),
49+
Test / scalacOptions --= Seq("-Ywarn-dead-code"),
50+
testFrameworks := Nil,
51+
updateOptions := updateOptions.value.withCachedResolution(true),
52+
libraryDependencies ++= Seq(Dep.kindProjector).filterNot(_ => scalaVersion.value.startsWith("3")),
5753
))
5854

5955
def definesMacros = ConfigureBoth(

project/Lib.scala

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,11 @@ object Lib {
3232
def publicationSettings(ghProject: String) =
3333
ConfigureBoth(
3434
_.settings(
35-
publishTo := sonatypePublishToBundle.value,
36-
pomExtra :=
37-
<scm>
38-
<connection>scm:git:github.com/japgolly/{ghProject}</connection>
39-
<developerConnection>scm:git:git@github.com:japgolly/{ghProject}.git</developerConnection>
40-
<url>github.com:japgolly/{ghProject}.git</url>
41-
</scm>
42-
<developers>
43-
<developer>
44-
<id>japgolly</id>
45-
<name>David Barri</name>
46-
</developer>
47-
</developers>))
35+
developers := List(
36+
Developer("japgolly", "David Barri", "japgolly@gmail.com", url("https://japgolly.github.io/japgolly/")),
37+
),
38+
)
39+
)
4840
.jsConfigure(
4941
sourceMapsToGithub(ghProject))
5042

project/plugins.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
2-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
3-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
2+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
43
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
54
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
6-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
75
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")

release.sbt

Lines changed: 0 additions & 22 deletions
This file was deleted.

version.sbt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)