-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (48 loc) · 1.55 KB
/
release.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
name: Release
on:
push:
paths:
- '**.kts'
- '.github/**'
- 'docs/**'
- 'core/**'
- 'lib/**'
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build projects
run: './gradlew build --no-daemon --stacktrace --console=plain --rerun-tasks'
- name: Build core JAR
run: './gradlew core:coreJar --no-daemon --stacktrace --console=plain --rerun-tasks'
- name: Generate code coverage report
run: './gradlew core:jacocoTestReport --no-daemon'
- name: Upload code coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate API documentation
if: ${{github.event_name == 'push'}}
# Note the `--no-daemon` is important here to avoid memory leaks.
# See https://github.com/Kotlin/dokka/issues/1405 for more details
run: './gradlew dokkaHtml --no-daemon && ./gradlew dokkaJavaDoc --no-daemon'
- name: Publish API documentation
if: ${{github.event_name == 'push'}}
uses: JamesIves/[email protected]
with:
branch: docs
folder: docs/api/
target-folder: docs/api/