Skip to content

Update sbt-sonatype to 3.10.0 #262

Update sbt-sonatype to 3.10.0

Update sbt-sonatype to 3.10.0 #262

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
tags: [ '*.*.*' ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.sbt
~/.cache/coursier/v1
~/.ivy2/cache
key: ${{ runner.os }}-build-cache-${{ hashFiles('*.sbt') }}-${{ hashFiles('project/*') }}
- uses: olafurpg/setup-scala@v13
with:
java-version: zulu@1.8
- run: sbt scalafmtCheckAll scalafmtSbtCheck test publishLocal
- uses: actions/upload-artifact@v3
with:
name: sbt-rewarn
path: /home/runner/.ivy2/local
scripted:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
include:
- { sbt: 1_0_0, java: 8 }
- { sbt: 1_1_0, java: 8 }
- { sbt: 1_2_0, java: 8 }
- { sbt: 1_3_13, java: 8 }
- { sbt: latest, java: 8 }
- { sbt: 1_3_13, java: 11 }
- { sbt: latest, java: 11 }
- { sbt: 1_3_13, java: 14 }
- { sbt: latest, java: 14 }
fail-fast: false
name: test (java ${{ matrix.java }}, sbt ${{ matrix.sbt }})
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.sbt
~/.cache/coursier/v1
~/.ivy2/cache
key: ${{ runner.os }}-scripted-cache-${{ matrix.sbt }}-${{ hashFiles('*.sbt') }}-${{ hashFiles('project/*') }}
- uses: actions/download-artifact@v3
with:
name: sbt-rewarn
path: /home/runner/.ivy2/local
- uses: olafurpg/setup-scala@v13
with:
java-version: zulu@1.${{ matrix.java }}
- run: sbt sbt-rewarn-${{ matrix.sbt }}/scripted
env:
CI: true
test:
runs-on: ubuntu-latest
needs: scripted
steps:
- run: true
publish:
runs-on: ubuntu-latest
needs: test
if: github.repository == 'rtimush/sbt-rewarn' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') )
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.sbt
~/.cache/coursier/v1
~/.ivy2/cache
key: ${{ runner.os }}-publish-cache-${{ matrix.sbt }}-${{ hashFiles('*.sbt') }}-${{ hashFiles('project/*') }}
- uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- uses: olafurpg/setup-scala@v13
with:
java-version: zulu@1.8
- run: sbt publishSigned
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- if: startsWith(github.ref, 'refs/tags/')
run: sbt sonatypeBundleRelease
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}