Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put publishing setting on top #173

Closed
wants to merge 12 commits into from
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
spark: ["3.1.3","3.2.4", "3.3.4", "3.4.3", "3.5.1"]
spark: ["3.1.3","3.2.4", "3.3.4", "3.4.3", "3.5.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,6 +21,6 @@ jobs:
with:
jvm: zulu:8
- name: Test
run: sbt -Dspark.testVersion=${{ matrix.spark }} +test
run: sbt -Dspark.version=${{ matrix.spark }} +test
- name: Benchmark
run: sbt -Dspark.testVersion=${{ matrix.spark }} +benchmarks/Jmh/run
run: sbt -Dspark.version=${{ matrix.spark }} +benchmarks/Jmh/run
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
push:
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: coursier/setup-action@v1
with:
jvm: zulu:8
- run: sbt ci-release -Dspark.version=3.5.3
env:
PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}}
PGP_SECRET: ${{secrets.PGP_SECRET}}
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}
SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ There is a two step process for publishing.

Generate Scala 2.11 JAR files:

* Run `sbt -Dspark.testVersion=2.4.8`
* Run `sbt -Dspark.version=2.4.8`
* Run `> ; + publishSigned; sonatypeBundleRelease` to create the JAR files and release them to Maven.

Generate Scala 2.12 & Scala 2.13 JAR files:
Expand Down
36 changes: 21 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
inThisBuild(
List(
organization := "io.github.zeotuan",
homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests")),
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
developers ++= List(
Developer(
"MrPowers",
"Matthew Powers",
"@MrPowers",
url("https://github.com/MrPowers"))
)
)
)

enablePlugins(GitVersioning)
Compile / scalafmtOnCompile := true

organization := "com.github.mrpowers"
name := "spark-fast-tests"

version := "1.10.1"

val versionRegex = """^(.*)\.(.*)\.(.*)$""".r

val scala2_13 = "2.13.14"
val scala2_12 = "2.12.20"

val sparkVersion = System.getProperty("spark.testVersion", "3.5.1")
val sparkVersion = System.getProperty("spark.version", "3.5.3")
crossScalaVersions := {
sparkVersion match {
case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13)
Expand Down Expand Up @@ -39,6 +51,8 @@ lazy val core = (project in file("core"))
.settings(
commonSettings,
name := "core",
Compile / packageSrc / publishArtifact := true,
Compile / packageDoc / publishArtifact := true
)

lazy val benchmarks = (project in file("benchmarks"))
Expand Down Expand Up @@ -103,19 +117,11 @@ lazy val docs = (project in file("docs"))
Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs")
)

credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")

licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/mrpowers-io/spark-fast-tests"))
developers ++= List(
Developer("MrPowers", "Matthew Powers", "@MrPowers", url("https://github.com/MrPowers"))
)
scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), "[email protected]:MrPowers/spark-fast-tests.git"))

updateOptions := updateOptions.value.withLatestSnapshots(false)

publishMavenStyle := true

publishTo := sonatypePublishToBundle.value
Global / useGpgPinentry := true

Global / useGpgPinentry := true
import xerial.sbt.Sonatype.sonatypeCentralHost
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resolvers += Resolver.typesafeRepo("releases")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")

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

addSbtPlugin("org.typelevel" % "laika-sbt" % "1.2.0")

Expand Down