-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.66 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
name: Android CI
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
types: [closed]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create local.properties
run: |
echo "sdk.dir=\$ANDROID_HOME" > local.properties
echo "BASE_URL=\"${{ secrets.API_KEY }}\"" >> local.properties
echo "KAKAO_NATIVE_APP_KEY=${{ secrets.KAKAO_NATIVE_APP_KEY }}" >> local.properties
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
- name: Slack - Send Msg
uses: 8398a7/action-slack@v3
with:
status: ${{job.status}}
fields: workflow,commit,repo,author,job,ref,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Slack - Upload APK
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged)
uses: MeilCli/[email protected]
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channels: ${{ secrets.SLACK_CHANNEL }}
initial_comment: 'ReMind APP 배포 시작합니다'
file_type: 'apk'
file_name: 'app-debug.apk'
file_path: './app/build/outputs/apk/debug/app-debug.apk'