Skip to content

Commit

Permalink
fixing ci release
Browse files Browse the repository at this point in the history
  • Loading branch information
kailuowang committed Dec 1, 2022
1 parent fca347a commit 09c862e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
sbt ';project playSwagger;clean;+test'
- name: Example compile
run:
cd example && sbt clean scalafmtSbtCheck scalafmtCheckAll scalafixEnable "scalafixAll --check" compile
sbt publishForExample && cd example && sbt clean scalafmtSbtCheck scalafmtCheckAll scalafixEnable "scalafixAll --check" compile
9 changes: 7 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
organization in ThisBuild := "com.iheart"

scalafixDependencies in ThisBuild ++= Seq(
ThisBuild / scalafixDependencies ++= Seq(
"com.github.liancheng" %% "organize-imports" % "0.6.0",
"net.pixiv" %% "scalafix-pixiv-rule" % "2.4.0"
)

addCommandAlias(
"publishForExample",
";set ThisBuild / version := \"0.0.1-EXAMPLE\"; +publishLocal"
)

lazy val noPublishSettings = Seq(
skip in publish := true,
publish / skip := true,
publish := (),
publishLocal := (),
publishArtifact := false
Expand Down
2 changes: 1 addition & 1 deletion example/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")

// play swagger plugin
addSbtPlugin("com.iheart" % "sbt-play-swagger" % "0.13.1-SNAPSHOT")
addSbtPlugin("com.iheart" % "sbt-play-swagger" % "0.0.1-EXAMPLE")
24 changes: 3 additions & 21 deletions project/Publish.scala
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import com.jsuereth.sbtpgp.PgpKeys
import xerial.sbt.Sonatype.autoImport._
import sbt._, Keys._
import sbtrelease.ReleasePlugin.autoImport._
import ReleaseTransformations._

object Publish {

val coreSettings = Seq(
organization in ThisBuild := "com.iheart",
ThisBuild / organization := "com.iheart",
publishMavenStyle := true,
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.html")),
homepage := Some(url("http://iheartradio.github.io/play-swagger")),
Expand All @@ -24,24 +22,8 @@ object Publish {
)
),
pomIncludeRepository := { _ false },
publishArtifact in Test := false,
releaseCrossBuild := true,
publishTo := sonatypePublishToBundle.value,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
releaseStepCommandAndRemaining("+clean"),
releaseStepCommandAndRemaining("+test"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
Test / publishArtifact := false,
publishTo := sonatypePublishToBundle.value
)

}
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

0 comments on commit 09c862e

Please sign in to comment.