-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (69 loc) · 2.34 KB
/
capinworkflow.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
# This is a basic workflow to help you get started with Actions
name: Capin Android CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: Decode NAVER_MAP_CLIENT_ID
env:
NAVER_MAP_CLIENT_ID: ${{ secrets.NAVER_MAP_CLIENT_ID }}
run: echo NAVER_MAP_CLIENT_ID=\"$NAVER_MAP_CLIENT_ID\" > ./local.properties
- name: Decode BASE_URL
env:
BASE_URL: ${{ secrets.BASE_URL }}
run: echo BASE_URL=\"$BASE_URL\" > ./local.properties
- 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: Change gradlew permissions
run: chmod +x ./gradlew
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Build APK
run: bash ./gradlew assembleDebug --stacktrace
- run: './gradlew assembleDebug'
- uses: MeilCli/slack-upload-file@v1
with:
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }}
channels: ${{ secrets.SLACK_CHANNEL_DEPLOY }}
file_path: 'app/build/outputs/apk/debug/app-debug.apk'
file_name: 'Capin.apk'
file_type: 'apk'
initial_comment: '${{ github.ref }} Success Deploy Capin Debug APK'
- name: upload apk artifact
uses: actions/upload-artifact@v2
with:
name: app-debug.apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: action-slack
uses: 8398a7/[email protected]
with:
status: ${{ job.status }}
author_name: Notify Build
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}