diff --git a/.github/workflows/scala-build-test-publish.yaml b/.github/workflows/scala-build-test-publish.yaml new file mode 100644 index 00000000..7738008e --- /dev/null +++ b/.github/workflows/scala-build-test-publish.yaml @@ -0,0 +1,36 @@ +name: Scala Build, Test and Publish + +on: + push: + branches-ignore: + - master + - main + +env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + +jobs: + build: + name: Build | Test | Publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup JDK + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + cache: sbt + + - name: run build + run: sbt assembly + + - name: run tests + run: sbt -v +test + + - name: publish package + run: sbt publish + + diff --git a/build.sbt b/build.sbt index c6d7dbdb..b7f89076 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,10 @@ name := "Ignition-Core" -version := "1.0" +organization := "chaordic" + +version := "1.2.4" + +ThisBuild / versionScheme := Some("early-semver") scalaVersion := "2.11.12" @@ -30,3 +34,9 @@ libraryDependencies += "org.joda" % "joda-convert" % "1.8.2" libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.25" libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.3" + +githubOwner := "chaordic" +githubRepository := "ignition-core" +publishMavenStyle := true +githubTokenSource := TokenSource.GitConfig("github.token") || TokenSource.Environment("GITHUB_TOKEN") + diff --git a/project/build.properties b/project/build.properties index 7c58a83a..563a014d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.6 +sbt.version=1.7.2 diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 00000000..7e58861c --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,2 @@ +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") +addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")