Skip to content

Commit 29e14f9

Browse files
authored
Merge pull request #28 from dwickern/sbt-ci-release
Set up sbt-ci-release
2 parents 54eeb9a + 101cc0c commit 29e14f9

File tree

4 files changed

+34
-43
lines changed

4 files changed

+34
-43
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [master, main]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- uses: actions/setup-java@v4
14+
with:
15+
distribution: temurin
16+
java-version: 8
17+
cache: sbt
18+
- uses: sbt/setup-sbt@v1
19+
- run: sbt ci-release
20+
env:
21+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
22+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
23+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
24+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

build.sbt

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import ReleaseTransformations._
2-
31
ThisBuild / organization := "com.github.dwickern"
42

53
lazy val scala3 = "3.3.5"
@@ -15,15 +13,12 @@ lazy val root = project.in(file("."))
1513
target := baseDirectory.value / "target",
1614
ideSkipProject := false,
1715
publish / skip := true,
18-
releaseCrossBuild := false,
1916
mdocIn := baseDirectory.value / "README.md",
2017
)
2118

2219
lazy val nameof = (projectMatrix in file("."))
2320
.settings(
2421
name := "scala-nameof",
25-
publishTo := sonatypePublishToBundle.value,
26-
releaseCrossBuild := true,
2722
ideSkipProject := true,
2823
libraryDependencies ++= Seq(
2924
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
@@ -45,38 +40,13 @@ lazy val nameof = (projectMatrix in file("."))
4540

4641
Global / excludeLintKeys += ideSkipProject
4742

48-
ThisBuild / pomExtra := {
49-
<url>https://github.com/dwickern/scala-nameof</url>
50-
<licenses>
51-
<license>
52-
<name>MIT license</name>
53-
<url>http://www.opensource.org/licenses/mit-license.php</url>
54-
</license>
55-
</licenses>
56-
<scm>
57-
<connection>scm:git:github.com/dwickern/scala-nameof.git</connection>
58-
<developerConnection>scm:git:git@github.com:dwickern/scala-nameof.git</developerConnection>
59-
<url>github.com/dwickern/scala-nameof.git</url>
60-
</scm>
61-
<developers>
62-
<developer>
63-
<id>dwickern</id>
64-
<name>Derek Wickern</name>
65-
<url>https://github.com/dwickern</url>
66-
</developer>
67-
</developers>
68-
}
69-
70-
releaseProcess := Seq[ReleaseStep](
71-
checkSnapshotDependencies,
72-
inquireVersions,
73-
runClean,
74-
runTest,
75-
setReleaseVersion,
76-
commitReleaseVersion,
77-
tagRelease,
78-
releaseStepCommandAndRemaining("+publishSigned"),
79-
releaseStepCommand("sonatypeBundleRelease"),
80-
setNextVersion,
81-
commitNextVersion,
43+
ThisBuild / homepage := Some(url("https://github.com/dwickern/scala-nameof"))
44+
ThisBuild / licenses := Seq(License.MIT)
45+
ThisBuild / developers := List(
46+
Developer(
47+
id = "dwickern",
48+
name = "Derek Wickern",
49+
email = "dwickern@gmail.com",
50+
url = url("https://github.com/dwickern")
51+
)
8252
)

project/plugins.sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
logLevel := Level.Warn
22

3-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
4-
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
5-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
3+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.2")
64
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0")
75
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2")
86
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.4" )

version.sbt

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

0 commit comments

Comments
 (0)