-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (84 loc) · 3.76 KB
/
develop_merge_builder.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# This is a basic workflow to help you get started with Actions
name: HFM Develop Merge Builder
on:
push:
branches: [ develop ]
defaults:
run:
shell: bash
working-directory: .
jobs:
build:
name: Generate APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Touch local properties
run: touch local.properties
- name: Access NAVER_API_MAP_KEY
env:
NAVER_API_MAP_KEY: ${{ secrets.NAVER_API_MAP_KEY }}
run: echo "NAVER_API_MAP_KEY=\"$NAVER_API_MAP_KEY\"" >> local.properties
- name: Access NAVER_CLIENT_ID
env:
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
run: echo "NAVER_CLIENT_ID=\"$NAVER_CLIENT_ID\"" >> local.properties
- name: Access NAVER_CLIENT_SECRET
env:
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
run: echo "NAVER_CLIENT_SECRET=\"$NAVER_CLIENT_SECRET\"" >> local.properties
- name: Access NAVER_CLIENT_NAME
env:
NAVER_CLIENT_NAME: ${{ secrets.NAVER_CLIENT_NAME }}
run: echo "NAVER_CLIENT_NAME=\"$NAVER_CLIENT_NAME\"" >> local.properties
- name: Access KAKAO_APP_KEY
env:
KAKAO_APP_KEY: ${{ secrets.KAKAO_APP_KEY }}
run: echo "KAKAO_APP_KEY=\"$KAKAO_APP_KEY\"" >> local.properties
- name: Access KAKAO_NATIVE_KEY
env:
KAKAO_NATIVE_KEY: ${{ secrets.KAKAO_NATIVE_KEY }}
run: echo "KAKAO_NATIVE_KEY=\"$KAKAO_NATIVE_KEY\"" >> local.properties
- name: Access HFM_BASE_URL
env:
HFM_BASE_URL: ${{ secrets.HFM_BASE_URL }}
run: echo "HFM_BASE_URL=\"$HFM_BASE_URL\"" >> local.properties
- name: Change gradlew permissions
run: chmod +x ./gradlew
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: On Failed, Notify in Slack
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: '#ff0000'
SLACK_ICON: https://avatars.githubusercontent.com/u/85377241?s=200&v=4?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'Health-Food-Me/Android Debug build Fail❌'
MSG_MINIMAL: true
SLACK_USERNAME: HELFOOME-AOS
SLACK_MESSAGE: '에러를 확인해주세요'
# - name: Upload APK
# if: ${{ success() }}
# uses: MeilCli/slack-upload-file@v1
# with:
# slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }}
# channels: ${{ secrets.SLACK_CHANNEL_DEPOLY }}
# file_path: 'app/build/outputs/apk/debug/app-debug.apk'
# file_name: 'HealthFoodMe.apk'
# file_type: 'apk'
# initial_comment: '헬푸미 APK 파일입니다~!'