From 262ee44bfdb879f9412530d8fc48026ee7f40529 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Thu, 19 Oct 2023 15:26:06 +0900 Subject: [PATCH] use setup-java instead of deprecated olafurpg/setup-scala --- .github/workflows/ci.yml | 15 +++++++++++---- .github/workflows/release.yml | 3 ++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f17f86b0..97d5af83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,10 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: java-version: 8 + distribution: adopt - name: Mount caches uses: actions/cache@v2 with: @@ -47,9 +48,10 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: olafurpg/setup-scala@v10 + - uses: actions/setup-java@v3 with: java-version: 11 + distribution: adopt - name: Mount caches uses: actions/cache@v2 with: @@ -58,17 +60,22 @@ jobs: ~/.ivy2/cache ~/.cache/coursier key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }} + - name: download sbt + run: | + curl -sL https://raw.githubusercontent.com/dwijnand/sbt-extras/7b70bbfc1cbe04172b5299ac092050d78d615a5a/sbt -o sbt + chmod +x ./sbt + shell: bash - name: Compile and run scripted tests with older version if: ${{ matrix.scripted-sbt != 'project' }} env: SCRIPTED_SBT: ${{ matrix.scripted-sbt }} run: | - sbt "set scriptedSbt := \"$SCRIPTED_SBT\"" scripted + ./sbt "set scriptedSbt := \"$SCRIPTED_SBT\"" scripted shell: bash - name: Compile and run scripted tests with project version if: ${{ matrix.scripted-sbt == 'project' }} run: | - sbt "set scriptedSbt := sbtVersion.value" scripted + ./sbt "set scriptedSbt := sbtVersion.value" scripted shell: bash # Single final job for mergify. ci-passed: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b3c30f2..4f6d01a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,10 @@ jobs: ~/.ivy2/cache ~/.cache/coursier key: ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }} - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: java-version: 8 + distribution: adopt - name: Publish ${{ github.ref }} run: sbt ci-release env: