language: scala

jobs:
  include:
    - stage: check
      script: sbt ^headerCheck
      name: "Copyright header check"

    - stage: test
      script: sbt verify
      jdk: oraclejdk8
      name: "Compile, test and build docs with JDK8"

    - script: sbt verify
      jdk: openjdk11
      name: "Compile, test and build docs with JDK11"

    - stage: publish
      script: sbt ci-release
      jdk: oraclejdk8
      name: "Cross publish artifacts"

stages:
  # runs on master commits and PRs
  - name: test
    if: NOT tag =~ ^v

  # runs on main repo version-tagged commits
  - name: publish
    if: repo = lightbend/paradox AND tag =~ ^v

cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt

before_cache:
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

notifications:
  email:
    on_success: never

language: scala

jobs:
  include:
    - stage: check
      script: sbt ^headerCheck
      name: "Copyright header check"

    - stage: test
      script: sbt verify
      jdk: oraclejdk8
      name: "Compile, test and build docs with JDK8"

    - script: sbt verify
      jdk: openjdk11
      name: "Compile, test and build docs with JDK11"

    - stage: publish
      script: sbt ci-release
      jdk: oraclejdk8
      name: "Cross publish artifacts"

stages:
  # runs on master commits and PRs
  - name: check
    if: NOT tag =~ ^v

  # runs on master commits and PRs
  - name: test
    if: NOT tag =~ ^v

  # runs on main repo version-tagged commits
  - name: publish
    if: repo = lightbend/paradox AND tag =~ ^v

cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt

before_cache:
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

notifications:
  email:
    on_success: never

Add check to all stages
Add check to all stages
