Skip to content

Bump actions/setup-java from 4.4.0 to 4.5.0 #363

Bump actions/setup-java from 4.4.0 to 4.5.0

Bump actions/setup-java from 4.4.0 to 4.5.0 #363

Workflow file for this run

name: CI
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
build:
name: Build and test
strategy:
matrix:
scala: [ 2.11.12, 2.12.20, 2.13.15 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4.5.0
with:
java-version: '8'
distribution: 'temurin'
- name: Set up sbt
uses: sbt/setup-sbt@v1
- name: Cache sbt
uses: actions/cache@v4
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') }}
- name: Verify formatting
run: sbt scalafmtCheckAll
- name: Run tests
if: ${{ !startsWith(matrix.scala, '2.13') }}
run: sbt --client '++${{ matrix.scala }} clean; test'
- name: Run tests and coverage
if: ${{ startsWith(matrix.scala, '2.13') }}
run: sbt --client '++${{ matrix.scala }} clean; coverage; test'
- name: Coverage
if: ${{ startsWith(matrix.scala, '2.13') }}
run: sbt --client '++${{ matrix.scala }} coverageReport'
- name: Codecov
if: ${{ startsWith(matrix.scala, '2.13') }}
uses: codecov/codecov-action@v4.6.0
publish:
name: Publish artifacts
needs: [build]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4.5.0
with:
java-version: '8'
distribution: 'temurin'
- name: Set up sbt
uses: sbt/setup-sbt@v1
- name: Cache sbt
uses: actions/cache@v4
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') }}
- name: Publish snapshot
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: sbt --client +publish
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Setup GPG
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "$PGP_SECRET" | base64 --decode | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Publish release
if: startsWith(github.ref, 'refs/tags/v')
run: sbt --client +publishSigned sonatypeBundleRelease
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}