-
Notifications
You must be signed in to change notification settings - Fork 1
136 lines (112 loc) · 4.69 KB
/
CD.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CD
on:
push:
branches: [ release ]
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 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Write compile time google-services.json file
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $GOOGLE_SERVICES_JSON > app/google-services.json
- name: Touch local properties
run: touch 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 RUNNECT_NODE_URL
env:
RUNNECT_NODE_URL: ${{ secrets.RUNNECT_NODE_URL }}
run: echo "RUNNECT_NODE_URL=\"$RUNNECT_NODE_URL\"" >> local.properties
- name: Access RUNNECT_DEV_URL
env:
RUNNECT_DEV_URL: ${{ secrets.RUNNECT_DEV_URL }}
run: echo "RUNNECT_DEV_URL=\"$RUNNECT_DEV_URL\"" >> local.properties
- name: Access RUNNECT_PROD_URL
env:
RUNNECT_PROD_URL: ${{ secrets.RUNNECT_PROD_URL }}
run: echo "RUNNECT_PROD_URL=\"$RUNNECT_PROD_URL\"" >> local.properties
- name: Access TMAP_BASE_URL
env:
TMAP_BASE_URL: ${{ secrets.TMAP_BASE_URL }}
run: echo "TMAP_BASE_URL=\"$TMAP_BASE_URL\"" >> local.properties
- name: Access TMAP_API_KEY
env:
TMAP_API_KEY: ${{ secrets.TMAP_API_KEY }}
run: echo "TMAP_API_KEY=\"$TMAP_API_KEY\"" >> local.properties
- name: Access GOOGLE_CLIENT_ID
env:
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
run: echo "GOOGLE_CLIENT_ID=\"$GOOGLE_CLIENT_ID\"" >> local.properties
- name: Access REMOTE_KEY_APP_VERSION
env:
REMOTE_KEY_APP_VERSION: ${{ secrets.REMOTE_KEY_APP_VERSION }}
run: echo "REMOTE_KEY_APP_VERSION=\"$REMOTE_KEY_APP_VERSION\"" >> local.properties
- name: Access KAKAO_CHANNEL_ID
env:
KAKAO_CHANNEL_ID: ${{ secrets.KAKAO_CHANNEL_ID }}
run: echo "KAKAO_CHANNEL_ID=\"$KAKAO_CHANNEL_ID\"" >> local.properties
- name: Access KEY_ALIAS
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
run: echo "KEY_ALIAS=\"$KEY_ALIAS\"" >> local.properties
- name: Access KEY_PASSWORD
env:
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: echo "KEY_PASSWORD=\"$KEY_PASSWORD\"" >> local.properties
- name: Access STORE_PASSWORD
env:
STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
run: echo "STORE_PASSWORD=\"$KEYSTORE_PASSWORD\"" >> local.properties
- name: Add kakao_strings.xml
env:
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
KAKAO_REDIRECTION_SCHEME: ${{ secrets.KAKAO_REDIRECTION_SCHEME }}
run: |
echo '<?xml version="1.0" encoding="utf-8"?>' > app/src/main/res/values/kakao_strings.xml
echo '<resources>' >> app/src/main/res/values/kakao_strings.xml
echo ' <string name="kakao_native_app_key">$KAKAO_NATIVE_APP_KEY</string>' >> app/src/main/res/values/kakao_strings.xml
echo ' <string name="kakao_redirection_scheme">$KAKAO_REDIRECTION_SCHEME</string>' >> app/src/main/res/values/kakao_strings.xml
echo '</resources>' >> app/src/main/res/values/kakao_strings.xml
- name: Decode And Save Keystore Base64
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > app/RunnectKeystore.jks
- name: Change gradlew permissions
run: chmod +x ./gradlew
- name: Build Release AAB
run: ./gradlew bundleRelease --stacktrace --info
- name: Save latest commit message as release notes for Korea
run: |
mkdir -p distribution/whatsnew
git log -1 --pretty=format:"%s" > distribution/whatsnew/ko-KR.txt
- name: Release AAB
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.runnect.runnect
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: production
status: completed
whatsNewDirectory: 'distribution/whatsnew'