Merge pull request #271 from scala-steward/update/sbt-jmh-0.4.7 #505
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scala CI | |
on: | |
push: | |
branches: [ master ] | |
tags: [ v* ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
scala: [2.12.20, 2.13.15, 3.3.4] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Test | |
run: sbt ++${{matrix.scala}} test | |
fmt: | |
name: Fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Fmt | |
run: sbt "scalafmtCheckAll;scalafmtSbtCheck" | |
publish: | |
name: Publish Artifacts | |
needs: [test] | |
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 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: coursier-cache | |
uses: coursier/cache-action@v6 | |
- name: Publish artifacts | |
env: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
run: sbt ci-release |