Merge pull request #225 from scala-steward/update/sbt-1.8.3 #511
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
release: | |
types: | |
- published | |
jobs: | |
scalafmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 8 | |
- run: sbt scalafmtCheckAll | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ['jvm', 'js', 'native'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 8 | |
- name: JVM tests | |
if: matrix.platform == 'jvm' | |
run: sbt +core/test | |
- name: JS tests | |
if: matrix.platform == 'js' | |
run: sbt +coreJS/test | |
- name: Native tests | |
if: matrix.platform == 'native' | |
run: sbt +coreNative/test | |
publish: | |
needs: test | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: coursier/[email protected] | |
- name: coursier-setup | |
uses: laughedelic/coursier-setup@v1 | |
- uses: olafurpg/setup-gpg@v3 | |
- name: Create docs directory | |
run: mkdir generated-docs | |
- name: Release | |
run: sbt ci-release | |
env: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
documentation: | |
needs: test | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 8 | |
- name: Create docs directory | |
run: mkdir generated-docs | |
- name: Generate Website | |
run: sbt doc | |
- name: Deploy Website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.DOC_TOKEN }} | |
publish_dir: generated-docs/ | |
publish_branch: gh-pages |