-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (57 loc) · 1.62 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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test and deploy
on:
push:
branches:
- master
- develop
tags:
- "*"
pull_request:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Run tests
run: sbt coverage +test coverageReport
- name: Aggregate coverage data
run: sbt coverageAggregate
- name: Aggregate coverage data and submit
run: sbt coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')
needs: test
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- run: sbt "project core" ci-release
env:
PGP_PASSPHRASE: ${{ secrets.SONA_PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.SONA_PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONA_PASS }}
SONATYPE_USERNAME: snowplow
- name: Publish ScalaDoc
run: |
project_version=${GITHUB_REF#refs/tags/}
sbt "project core" makeSite
echo Publishing Scaladoc
git fetch
git checkout gh-pages
cp -r modules/core/target/site/* .
git config user.name "GitHub Actions"
git config user.email "<>"
git add $project_version
git commit -m "Added Scaladoc for $project_version"
git push origin gh-pages