forked from JuulLabs/kable
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.53 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
name: CI
on:
pull_request:
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: "adopt-hotspot"
java-version: "11.0.11+9"
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.konan
~/.android/build-cache
~/.android/cache
key: ${{ runner.os }}-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- run: ./gradlew assemble
- run: ./gradlew check
- run: |
set -o xtrace
if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then
./gradlew \
--no-parallel \
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" \
-PsigningInMemoryKeyPassword="${{ secrets.SIGNING_PASSWORD }}" \
publishToMavenLocal
else
./gradlew \
--no-parallel \
-PRELEASE_SIGNING_ENABLED=false \
publishToMavenLocal
fi
if: ${{ runner.os == 'macOS' && github.repository_owner == 'JuulLabs' }}
- run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties