-
Notifications
You must be signed in to change notification settings - Fork 22
89 lines (84 loc) · 2.18 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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