Skip to content

Update sbt-sonatype to 3.11.3 #154

Update sbt-sonatype to 3.11.3

Update sbt-sonatype to 3.11.3 #154

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
tags: [ '*.*.*' ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: |
~/.sbt
~/.cache/coursier/v1
~/.ivy2/cache
key: ${{ runner.os }}-build-cache-${{ hashFiles('*.sbt') }}-${{ hashFiles('project/*') }}
- uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- run: sbt scalafmtCheckAll scalafmtSbtCheck test publishLocal
publish:
runs-on: ubuntu-latest
needs: build
if: github.repository == 'rtimush/zio-magic-comments' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') )
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: |
~/.sbt
~/.cache/coursier/v1
~/.ivy2/cache
key: ${{ runner.os }}-publish-cache-${{ hashFiles('*.sbt') }}-${{ hashFiles('project/*') }}
- uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
- uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- 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 }}