-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 2.84 KB
/
action_build.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
# The name of our workflow
name: Build
# Trigger on every push
on: [push,pull_request]
jobs:
# The name of job
build_debug :
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Create file
run: |
echo "sdk.dir=$ANDROID_HOME" > ./local.properties
echo "signing.key.alias=${{ secrets.SIGN_KEY_ALIAS }}" >> ./local.properties
echo "signing.key.password=${{ secrets.SIGN_KEY_PASS }}" >> ./local.properties
echo "signing.store.file=.${{ secrets.SIGN_STORE_FILE }}" >> ./local.properties
echo "signing.store.password=${{ secrets.SIGN_STORE_PASS }}" >> ./local.properties
echo "API.KEY=${{secrets.API_KEY}}" >> ./local.properties
echo "mapbox.API.KEY=${{secrets.MAPBOX_KEY}}" >> ./local.properties
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Exec permissions
run: chmod +x ./gradlew
- name: Build the debug app
run: ./gradlew assembleDebug
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: build_debug_output
path: app/build/outputs/apk/
build_release :
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Create file
run: |
echo "sdk.dir=$ANDROID_HOME" > ./local.properties
echo "signing.key.alias=${{ secrets.SIGN_KEY_ALIAS }}" >> ./local.properties
echo "signing.key.password=${{ secrets.SIGN_KEY_PASS }}" >> ./local.properties
echo "signing.store.file=.${{ secrets.SIGN_STORE_FILE }}" >> ./local.properties
echo "signing.store.password=${{ secrets.SIGN_STORE_PASS }}" >> ./local.properties
echo "API.KEY=${{secrets.API_KEY}}" >> ./local.properties
echo "mapbox.API.KEY=${{secrets.MAPBOX_KEY}}" >> ./local.properties
mkdir -p $(dirname ${{ secrets.SIGN_STORE_FILE }}) && touch ${{ secrets.SIGN_STORE_FILE }}
echo ${{ secrets.KEY_STORE_FILE_BASE64 }} | base64 --decode > ${{ secrets.SIGN_STORE_FILE }}
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Exec permissions
run: chmod +x ./gradlew
- name: Build the release app
run: ./gradlew assembleRelease
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: build_release_output
path: app/build/outputs/apk/