Skip to content

Release v0.20.1

Release v0.20.1 #526

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: dynver check
run: sbt dynverAssertVersion
- name: Scalafmt
run: sbt scalafmtCheck test:scalafmtCheck
- name: Test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt coverage test coverageReport
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Clean up
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- name: Generate example schemas
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt generateSchemas
- name: Install ajv
run: |
yarn global add ajv-cli ajv-formats
yarn global bin >> $GITHUB_PATH
- name: Validate generated schema
run: |
for schema in target/jsonoid-schemas/*.json; do
ajv compile --spec=draft2020 -s $schema -c ajv-formats
done
assemble:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Assemble
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt assembly
- name: Upload JAR
uses: actions/upload-artifact@v4
with:
name: jsonoid-discovery.jar
if-no-files-found: error
path: target/scala-2.13/jsonoid-discovery*.jar
publish-site:
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') }}
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Publish site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sbt makeSite
sbt generateSchemas
cp target/jsonoid-schemas/*.json target/site/schemas
sbt publishToGitHubPages