Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
pk044 committed Apr 14, 2023
1 parent 66bbf52 commit eaae612
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 34 deletions.
45 changes: 13 additions & 32 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import com.jsuereth.sbtpgp.PgpKeys
import sbtrelease.ReleasePlugin.autoImport._
import sbtrelease.ReleaseStateTransformations._

val isDotty = Def.setting(CrossVersion.partialVersion(scalaVersion.value).exists(_._1 != 2))

Expand Down Expand Up @@ -28,29 +25,35 @@ val dotty = "3.2.2"
val mainScalaVersion = scala_2_13
val supportedScalaVersions = Seq(scala_2_12, scala_2_13, dotty)

ThisBuild / crossScalaVersions := supportedScalaVersions
ThisBuild / scalaVersion := mainScalaVersion

lazy val baseSettings = Seq(
// Scala settings
homepage := Some(url("https://github.com/theiterators/sealed-monad")),
scalaVersion := mainScalaVersion,
scalacOptions := Seq("-deprecation", "-unchecked", "-feature", "-encoding", "utf8") ++
(if (isDotty.value)
Seq("-language:implicitConversions", "-Ykind-projector", "-Xignore-scala2-macros")
else Nil),
scalafmtOnCompile := true,
// Sonatype settings
publishTo := sonatypePublishTo.value,
sonatypeProfileName := "pl.iterators",
publishMavenStyle := true,
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")),
organization := "pl.iterators",
organizationName := "Iterators",
organizationHomepage := Some(url("https://iterato.rs")),
organizationHomepage := Some(url("https://www.iteratorshq.com")),
developers := List(
Developer(
id = "mrzeznicki",
name = "Marcin Rzeźnicki",
email = "[email protected]",
url = url("https://github.com/marcin-rzeznicki")
),
Developer(
id = "pkiersznowski",
name = "Paweł Kiersznowski",
email = "[email protected]",
url = url("https://github.com/pk044")
)
),
scmInfo := Some(
Expand All @@ -59,21 +62,13 @@ lazy val baseSettings = Seq(
connection = "scm:git:https://github.com/theiterators/sealed-monad.git"
)
),
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
crossScalaVersions := supportedScalaVersions,
releaseCrossBuild := true
crossScalaVersions := supportedScalaVersions
)

lazy val noPublishSettings =
Seq(
publishArtifact := false,
releaseCrossBuild := false,
skip / publish := true,
releasePublishArtifactsAction := {
val projectName = name.value
streams.value.log.warn(s"Publishing for $projectName is turned off")
}
skip / publish := true
)

lazy val examples = project
Expand Down Expand Up @@ -123,19 +118,5 @@ lazy val sealedMonad = project
.settings(baseSettings: _*)
.settings(
name := "sealed-monad",
description := "Scala library for nice for-comprehension-style error handling",
releaseProcess := Seq(
checkSnapshotDependencies,
inquireVersions,
releaseStepCommandAndRemaining("+publishLocalSigned"),
releaseStepCommandAndRemaining("+clean"),
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
pushChanges
)
description := "Scala library for nice for-comprehension-style error handling"
)
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.10.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7")
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

0 comments on commit eaae612

Please sign in to comment.