From bc88f1b98b7faaeb2df826d470c03f2269a613ac Mon Sep 17 00:00:00 2001 From: etorreborre Date: Thu, 10 Aug 2023 16:15:22 +0200 Subject: [PATCH] project: update the github actions plugin --- .github/workflows/ci.yml | 56 +++++++++++++------------------------ .github/workflows/clean.yml | 2 +- project/plugins.sbt | 2 +- 3 files changed, 21 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a721356b94..d4b22aed72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,36 +23,27 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.8, 2.12.17] - java: [adopt@1.8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v12 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v3 with: - java-version: ${{ matrix.java }} - - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + distribution: temurin + java-version: 8 + cache: sbt - name: Check that workflows are up to date - run: sbt ++${{ matrix.scala }} githubWorkflowCheck + run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - name: Build project - run: sbt ++${{ matrix.scala }} 'testOnly -- xonly exclude ci' + run: sbt '++ ${{ matrix.scala }}' 'testOnly -- xonly exclude ci' publish: name: Publish Artifacts @@ -62,30 +53,21 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13.10] - java: [adopt@1.8] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup Java and Scala - uses: olafurpg/setup-scala@v12 - with: - java-version: ${{ matrix.java }} - - - name: Cache sbt - uses: actions/cache@v2 + - name: Setup Java (temurin@8) + if: matrix.java == 'temurin@8' + uses: actions/setup-java@v3 with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + distribution: temurin + java-version: 8 + cache: sbt - name: Publish project - run: sbt ++${{ matrix.scala }} +publish \ No newline at end of file + run: sbt +publish diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index b535fcc189..547aaa43e2 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -56,4 +56,4 @@ jobs: printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size ghapi -X DELETE $REPO/actions/artifacts/$id done - done \ No newline at end of file + done diff --git a/project/plugins.sbt b/project/plugins.sbt index 05ca1e6440..9ce326a64f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -14,7 +14,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.15.0") resolvers += Resolver.url("sonatype", new URL("https://oss.sonatype.org/content/repositories/releases"))(Resolver.ivyStylePatterns)