-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.24 KB
/
build-pr.yaml
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
name: Build PR
on:
pull_request:
branches:
- master
jobs:
build_mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 20
- name: Configure cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository
~/.konan
key: ${{ runner.os }}-gradle-dependency-cache
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- name: Lint check
run: ./gradlew ktlintCheck
- name: Build all targets
run: ./gradlew assemble
- name: Run JVM tests
run: ./gradlew jvmTest
# - name: Run Mac/Native tests
# run: ./gradlew macNativeTest
- name: Prepare for Publishing
run: ./gradlew prepareForPublish
- name: Publish to GitHub Releases
run: ./gradlew githubRelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
BUILD_QUALITY: "PR"