From 6762042bb72710206695d56c936ea13c337a8c0d Mon Sep 17 00:00:00 2001 From: Ben Plommer Date: Tue, 29 Mar 2022 14:03:52 +0100 Subject: [PATCH] Update sbt-gha, add JDK 17 to pipeline --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++-------- build.sbt | 2 ++ project/plugins.sbt | 2 +- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44dc5a69a..c2d991bb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.15, 2.13.8, 3.1.1] - java: [adopt@1.8] + java: [temurin@8, temurin@17] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -32,10 +32,19 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v13 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 17 - name: Cache sbt uses: actions/cache@v2 @@ -65,7 +74,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.8] - java: [adopt@1.8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -73,10 +82,19 @@ jobs: with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v13 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v2 + with: + distribution: temurin + java-version: 8 + + - name: Setup Java (temurin@17) + if: matrix.java == 'temurin@17' + uses: actions/setup-java@v2 with: - java-version: ${{ matrix.java }} + distribution: temurin + java-version: 17 - name: Cache sbt uses: actions/cache@v2 diff --git a/build.sbt b/build.sbt index 42634c290..5ebd68e09 100644 --- a/build.sbt +++ b/build.sbt @@ -204,6 +204,8 @@ ThisBuild / githubWorkflowBuild := Seq( ThisBuild / githubWorkflowArtifactUpload := false +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("17")) + ThisBuild / githubWorkflowTargetTags ++= Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) diff --git a/project/plugins.sbt b/project/plugins.sbt index 95778ca57..9586534a5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -5,4 +5,4 @@ addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.1") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.5") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")