-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (45 loc) · 1.46 KB
/
main.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
name: CI
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Java8
uses: actions/setup-java@v1
with:
java-version: 11
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build release apk
run: chmod a+x gradlew && ./gradlew clean assembleRelease
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
# - uses: r0adkll/sign-android-release@v1
# name: Sign app APK
# # ID used to access action output
# id: sign_app
# with:
# releaseDirectory: app/build/outputs/apk/release/
# signingKeyBase64: ${{ secrets.SIGNING_KEY }}
# alias: ${{ secrets.ALIAS }}
# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
# keyPassword: ${{ secrets.KEY_PASSWORD }}
# env:
# BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: Archive apk
uses: actions/upload-artifact@v2
with:
name: apk
path: app/build/outputs/apk/release/ # ${{steps.sign_app.outputs.signedReleaseFile}}