Skip to content

Commit

Permalink
Use gha-scala-library-release-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyley committed Jan 17, 2025
1 parent 4cb1b39 commit ead5b8a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 51 deletions.
55 changes: 22 additions & 33 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
import ReleaseTransformations.*
import sbtversionpolicy.withsbtrelease.ReleaseVersion

lazy val baseSettings = Seq(
scalaVersion := "2.13.10",
organization := "com.madgag",
licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
publishTo := sonatypePublishToBundle.value,
scmInfo := Some(ScmInfo(
url("https://github.com/rtyley/line-break-preserving-line-splitting"),
"scm:git:git@github.com:rtyley/line-break-preserving-line-splitting.git"
)),
scalacOptions ++= Seq("-deprecation", "-unchecked")
licenses := Seq(License.Apache2),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-release:11")
)

name := "line-splitting-root"

description := "Splits lines of text while preserving line breaks"

ThisBuild / scalaVersion := "2.13.10"
ThisBuild / scalaVersion := "2.13.16"

lazy val lineSplitting = project.in(file("line-splitting")).settings(
baseSettings,
name := "line-break-preserving-line-splitting",
crossScalaVersions := Seq(scalaVersion.value, "3.2.1"),
crossScalaVersions := Seq(scalaVersion.value, "3.3.4"),
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.14" % Test,
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"com.madgag" %% "scala-collection-plus" % "0.11" % Test
),
Test/testOptions += Tests.Argument(
Expand All @@ -37,31 +34,23 @@ lazy val docs = project.in(file("line-splitting-generated-docs")) // important:
mdocOut := (ThisBuild / baseDirectory).value
)

import ReleaseTransformations._

lazy val lineSplittingRoot = (project in file("."))
.aggregate(
lineSplitting
)
.settings(baseSettings).settings(
publishArtifact := false,
publish := {},
publishLocal := {},
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
// For non cross-build projects, use releaseStepCommand("publishSigned")
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)

publish / skip := true,
releaseVersion := ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease().value,
releaseCrossBuild := true, // true if you cross-build the project for multiple Scala versions
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
setNextVersion,
commitNextVersion
)
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.10.7
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.15")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1")

addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24" )
14 changes: 0 additions & 14 deletions sonatype.sbt

This file was deleted.

0 comments on commit ead5b8a

Please # to comment.