From f2f69d0bf7c4722ef56830cc9bc912a3323e5cab Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Tue, 7 Jan 2025 08:36:56 +0100 Subject: [PATCH] fix github actions sbt is no longer included by default in the ubuntu 24 runner https://github.com/sbt/setup-sbt https://github.com/actions/setup-java/issues/712#issuecomment-2557396980 --- .github/workflows/pr.yml | 14 +++++--------- .github/workflows/release.yml | 20 ++++++++------------ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 27fff7d7..2ea0f114 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,19 +4,15 @@ jobs: pr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: temurin java-version: 21 - - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.coursier - key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} + cache: sbt + - uses: sbt/setup-sbt@v1 - name: scalafmtCheck and tests run: sbt scalafmtCheck Test/scalafmtCheck test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03a5c75f..b5779f0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,16 @@ jobs: concurrency: release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - uses: sbt/setup-sbt@v1 - name: apt-get update run: sudo apt-get update - name: Install gnupg @@ -19,17 +26,6 @@ jobs: run: echo $PGP_SECRET | base64 --decode | gpg --batch --import env: PGP_SECRET: ${{ secrets.PGP_SECRET }} - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 21 - - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.coursier - key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} - run: sbt +test ciReleaseTagNextVersion ciReleaseSonatype env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}