-
Notifications
You must be signed in to change notification settings - Fork 12
50 lines (40 loc) · 1.34 KB
/
test_and_deploy.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
name: Test and deploy
on: push
jobs:
test_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run tests
run: sbt 'set coverageEnabled := true' +test
- name: Aggregate coverage data
run: sbt coverageAggregate
- name: Check formatting
run: sbt scalafmtCheck
- name: Publish to Maven central
if: startsWith(github.ref, 'refs/tags/')
env:
PGP_PASSPHRASE: ${{ secrets.SONA_PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.SONA_PGP_SECRET }}
SONATYPE_USERNAME: ${{ secrets.SONA_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONA_PASS }}
run: sbt ci-release
- name: Generate API website
if: startsWith(github.ref, 'refs/tags/')
run: sbt makeSite
- name: Publish website
if: startsWith(github.ref, 'refs/tags/')
run: |
echo Publishing Scaladoc
git fetch
git checkout gh-pages
cp -r target/site/* .
git config user.name "GitHub Actions"
git config user.email "<>"
git add index.html $project_version
git commit -m "Added Scaladoc for $project_version"
git push origin gh-pages