-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (76 loc) · 2.96 KB
/
build_release.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
name: Build Inews Release
on:
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
cache: gradle
- name: Add Secret Variables
env:
KEY_STORE: ${{ secrets.KEY_STORE }}
KEY_STORE_ALIAS: ${{ secrets.KEY_STORE_ALIAS }}
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
TEST_STRING: ${{ secrets.TEST_STRING }}
run: |
touch app.properties
echo KEY_STORE = $KEY_STORE >> app.properties
echo KEY_STORE_ALIAS = $KEY_STORE_ALIAS >> app.properties
echo KEY_STORE_PASS = $KEY_STORE_PASS >> app.properties
echo TEST_STRING= $TEST_STRING >> app.properties
cat app.properties
- name: Build Debug APK
run: bash ./gradlew clean build assembleDebug bundleRelease --stacktrace
- name: Upload Lint Report
uses: actions/upload-artifact@v2
with:
name: Lint Report
path: ${{ github.workspace }}/app/build/reports/lint-results.html
- name: Upload debug apk
uses: actions/upload-artifact@v2
with:
name: Debug APK
path: ${{ github.workspace }}/app/build/outputs/apk/debug
- name: Sign app APK
uses: r0adkll/sign-android-release@v1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASS }}
keyPassword: ${{ secrets.KEY_STORE_PASS }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"
# Example use of `signedReleaseFile` output -- not needed
- name: Upload signed apk
uses: actions/upload-artifact@v2
with:
name: Signed APK
path: ${{steps.sign_app.outputs.signedReleaseFile}}
- name: Sign app AAB
uses: r0adkll/sign-android-release@v1
id: sign_app_bundle
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASS }}
keyPassword: ${{ secrets.KEY_STORE_PASS }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"
# Example use of `signedReleaseFile` output -- not needed
- name: Upload signed aab
uses: actions/upload-artifact@v2
with:
name: Signed AAB
path: ${{steps.sign_app_bundle.outputs.signedReleaseFile}}