Skip to content

Commit

Permalink
Merge pull request #35 from autodeployai/ci-release
Browse files Browse the repository at this point in the history
Add CI from Github actions
  • Loading branch information
scorebot authored Aug 28, 2024
2 parents f488f03 + 2e6d51d commit 02a9c5f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: sbt
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
45 changes: 8 additions & 37 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name := "pmml4s"

version := "1.0.2"

organization := "org.pmml4s"

organizationHomepage := Some(new URL("https://pmml4s.org"))
Expand Down Expand Up @@ -54,38 +52,11 @@ Test / unmanagedSourceDirectories := {
}
}

// publishing
updateOptions := updateOptions.value.withGigahorse(false)

publishMavenStyle := true

useGpg := true

// set overwrite to true for snapshot
publishConfiguration := publishConfiguration.value.withOverwrite(isSnapshot.value)
com.typesafe.sbt.pgp.PgpKeys.publishSignedConfiguration := com.typesafe.sbt.pgp.PgpKeys.publishSignedConfiguration.value.withOverwrite(isSnapshot.value)
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(isSnapshot.value)
com.typesafe.sbt.pgp.PgpKeys.publishLocalSignedConfiguration := com.typesafe.sbt.pgp.PgpKeys.publishLocalSignedConfiguration.value.withOverwrite(isSnapshot.value)

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

pomIncludeRepository := { _ => false }

pomExtra :=
<scm>
<url>git://github.com/autodeployai/pmml4s.git</url>
<connection>scm:git:git@github.com:autodeployai/pmml4s.git</connection>
</scm>
<developers>
<developer>
<id>scorebot</id>
<name>Score Bot</name>
</developer>
</developers>

ThisBuild / developers := List(
Developer(
"scorebot",
"Score Bot",
"[email protected]",
url("https://github.com/scorebot")
)
)

0 comments on commit 02a9c5f

Please sign in to comment.