From bcbf64255dec255b60796da6852fb252b93465a5 Mon Sep 17 00:00:00 2001 From: David Barri Date: Mon, 23 Aug 2021 09:53:55 +1000 Subject: [PATCH] Use GitHub Action: japgolly/setup-everything-scala Which makes use of the brand new GitHub Actions feature: action composition. This allows us to just have a single GHA for everything Scala and Scala.JS, and centralise and hide boring details like caching. --- .github/workflows/ci.yml | 12 ++++-------- .github/workflows/ghpages.yml | 7 +++---- .github/workflows/release.yml | 10 ++++++++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b81aac291..d6747b78c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v13 - with: - java-version: "adopt@1.8" - - uses: coursier/cache-action@v6 + + - name: Setup Scala + uses: japgolly/setup-everything-scala@v1.0 - name: Hacks for Scala 2.10 if: matrix.scalaversion == '2.10.7' @@ -52,9 +51,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v13 - with: - java-version: "adopt@1.8" - - uses: coursier/cache-action@v6 + - uses: japgolly/setup-everything-scala@v1.0 - name: Readme generation run: sbt readme/run diff --git a/.github/workflows/ghpages.yml b/.github/workflows/ghpages.yml index 1e39f5d0e..f263a21c5 100644 --- a/.github/workflows/ghpages.yml +++ b/.github/workflows/ghpages.yml @@ -11,10 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v13 - with: - java-version: "adopt@1.8" - - uses: coursier/cache-action@v6 + + - name: Setup Scala + uses: japgolly/setup-everything-scala@v1.0 - name: Build run: sbt readme/run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 214b4806d..e2c0ecb00 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,19 @@ jobs: env: SCALAJS_VERSION: "${{ matrix.scalajsversion == '0.6.x' && '0.6.28' || '' }}" steps: + - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: olafurpg/setup-scala@v13 + + - name: Setup Scala + uses: japgolly/setup-everything-scala@v1.0 + - name: Hacks for Scala 2.10 run: ./prepareForScala210.sh - - run: sbt ci-release + + - name: Release + run: sbt ci-release env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }}