Skip to content

Commit

Permalink
Setup sbt-ci-release
Browse files Browse the repository at this point in the history
  • Loading branch information
danslapman committed Sep 14, 2024
1 parent beb047a commit 4119dcc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-java@v3
with:
distribution: temurin
Expand All @@ -32,8 +35,33 @@ jobs:
run: sbt "project root3; test"
if: matrix.scala-version == '3'

release:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
check-latest: true

- name: Coursier cache
uses: coursier/cache-action@v6

- name: Publish artifacts
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ci-release

ci-passed:
runs-on: ubuntu-latest
needs: build
needs: release
steps:
- run: ':'
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,6 @@ lazy val root = (projectMatrix in file("."))
.settings(
crossScalaVersions := Nil,
publish := {},
publishArtifact := false
publishArtifact := false,
publish / skip := true
)
10 changes: 1 addition & 9 deletions project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ object Settings {
organization := "com.github.danslapman",
organizationName := "danslapman",
organizationHomepage := Some(url("https://github.com/danslapman")),
version := "3.2.0",
scalacOptions ++= {
(CrossVersion.partialVersion(scalaVersion.value): @unchecked) match {
case Some((2, 12)) =>
Expand Down Expand Up @@ -76,13 +75,6 @@ object Settings {
)
),
licenses += ("WTFPL", url("http://www.wtfpl.net")),
homepage := Some(url("https://github.com/danslapman/morphling")),
pomIncludeRepository := { _ => false },
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishMavenStyle := true
homepage := Some(url("https://github.com/danslapman/morphling"))
)
}
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1")

0 comments on commit 4119dcc

Please sign in to comment.