-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 2.15 KB
/
android.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
64
name: Main branch Gradle build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
steps:
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate secrets.properties
run: |
echo "SERVER_BASE_URL=${{ secrets.SERVER_BASE_URL }}" >> secrets.properties
echo "KAKAO_NATIVE_APP_KEY=${{ secrets.KAKAO_NATIVE_APP_KEY }}" >> secrets.properties
- name: Generate keystore.properties
run: |
echo "STORE_FILE=${{ secrets.STORE_FILE }}" >> keystore.properties
echo "STORE_PASSWORD=${{ secrets.STORE_PASSWORD }}" >> keystore.properties
echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> keystore.properties
echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> keystore.properties
- name: test Detekt
run: ./gradlew detekt
- name: test Ktlint
run: ./gradlew ktlintCheck
- name: Build with Gradle
run: ./gradlew buildDebug --stacktrace
- name: send to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: job,commit,repo,author,took
author_name: Heeg
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()