From 1fbb3b184bf09285610c87b439f76ec08636747d Mon Sep 17 00:00:00 2001 From: Gunnar Bastkowski Date: Mon, 24 Jun 2024 19:12:22 +0200 Subject: [PATCH] Set java version --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- build.sbt | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a00951..e5542f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [3.4.2] - java: [temurin@8] + java: [temurin@8, temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -32,6 +32,14 @@ jobs: with: fetch-depth: 0 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + cache: sbt + - name: Setup Java (temurin@21) if: matrix.java == 'temurin@21' uses: actions/setup-java@v3 @@ -83,6 +91,14 @@ jobs: java-version: 8 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Download target directories (3.4.2) uses: actions/download-artifact@v3 with: @@ -108,7 +124,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [3.4.2] - java: [temurin@8] + java: [temurin@8, temurin@21] runs-on: ${{ matrix.os }} steps: - name: Download target directories (3.4.2) diff --git a/build.sbt b/build.sbt index 44b9744..ef2fbbb 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,5 @@ ThisBuild / scalaVersion := Versions.scala3 +ThisBuild / githubWorkflowJavaVersions += JavaSpec.temurin("21") ThisBuild / githubWorkflowTargetTags ++= Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches += RefPredicate.StartsWith(Ref.Tag("v")) @@ -9,7 +10,6 @@ ThisBuild / githubWorkflowPublish := Seq( "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}"))) - ThisBuild / githubWorkflowUseSbtThinClient := false ThisBuild / githubWorkflowAddedJobs += WorkflowJob( id = "site",