Skip to content

Update sbt-mdoc to 2.3.8 #442

Update sbt-mdoc to 2.3.8

Update sbt-mdoc to 2.3.8 #442

Workflow file for this run

name: CICD
# triggers
on:
push:
branches: ['*']
release:
types: [ created ]
pull_request:
branches:
- main
# env variables
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
# jobs
jobs:
build:
name: build (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
matrix:
# supported scala versions
include:
- scala: 2.13.10
name: Scala2_13
test-tasks: coverage test coverageReport
- scala: 3.2.1
name: Scala3
test-tasks: test # scoverage doesn’t support Scala 3
steps:
- uses: actions/checkout@v4
#----------- JDK -----------
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: "liberica"
java-version: 17
#----------- CACHE -----------
- name: Cache SBT
uses: actions/cache@v3.3.2
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.ivy2/cache
~/.sbt
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-sbt-${{ matrix.scala }}-${{ hashFiles('**/build.sb') }}
#----------- COMPILE -----------
- name: Compile, Format, Test and Coverage for ${{ matrix.scala }}
run: sbt ++${{ matrix.scala }} clean scalafmtCheck ${{ matrix.test-tasks }}
#----------- COVERAGE -----------
- name: Codecov
run: bash <(curl -s https://codecov.io/bash)
# WAITING FOR ISSURE: https://github.com/codecov/codecov-action/issues/272
# uses: codecov/codecov-action@v1.3.1
# with:
# # Repository upload token - get it from codecov.io. Required only for private repositories
# token: $CODECOV_TOKEN
# # Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)
# env_vars: SCALA
deploy:
runs-on: ubuntu-latest
needs: [build]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
#----------- JDK -----------
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: "liberica"
java-version: 17
#----------- CACHE -----------
- name: Cache SBT
uses: actions/cache@v3.3.2
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.ivy2/cache
~/.sbt
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-sbt-${{ matrix.scala }}-${{ hashFiles('**/build.sb') }}
#----------- RELEASE -----------
- name: Release
run: sbt clean compile ci-release