-
Notifications
You must be signed in to change notification settings - Fork 16
166 lines (141 loc) · 6.71 KB
/
master.yaml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Master
on:
push:
branches: [ master ]
# Allows for running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
new_tag: ${{ steps.bump_version.outputs.new_tag }}
steps:
- name: Checkout the code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Bump version
id: bump_version
uses: oflynned/Android-Semantic-Release@b9f6de7f8bdf25de3f695843265debf7c3919272
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Write version to file for use in other workflows
run: |
echo ${{ steps.bump_version.outputs.new_tag }} > VERSION
- name: Create google-services.json from secrets
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $GOOGLE_SERVICES_JSON > app/google-services.json
- name: Set up JDK 11
uses: actions/setup-java@a18c333f3f14249953dab3e186e5e21bf3390f1d
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Clear gradle cache
run: |
mv ~/.gradle ~/.invalid || true
- name: Cache dependencies
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
- name: Check Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build the app
run: ./gradlew assembleRelease bundleRelease
- name: Upload VERSION
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: VERSION
path: VERSION
if-no-files-found: error
- name: Upload unsigned APK
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: bisq-release.apk
path: app/build/outputs/apk/release/bisq-release.apk
if-no-files-found: error
- name: Upload unsigned AAB
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: bisq-release.aab
path: app/build/outputs/bundle/release/bisq-release.aab
if-no-files-found: error
sign:
name: Sign
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
steps:
- name: Download unsigned APK
uses: actions/download-artifact@2a5974104b6d5dbdb2f9468a3e54da3bdd241578
with:
name: bisq-release.apk
path: app/build/outputs/apk/release
- name: Download unsigned AAB
uses: actions/download-artifact@2a5974104b6d5dbdb2f9468a3e54da3bdd241578
with:
name: bisq-release.aab
path: app/build/outputs/bundle/release
- name: Sign APK
uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f
id: sign_apk
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Sign AAB
uses: r0adkll/sign-android-release@dbeba6b98a60b0fd540c02443c7f428cdedf0e7f
id: sign_aab
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload signed APK
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: bisq-release-signed.apk
path: ${{ steps.sign_apk.outputs.signedReleaseFile }}
- name: Upload signed AAB
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: bisq-release-signed.aab
path: ${{ steps.sign_aab.outputs.signedReleaseFile }}
upload_to_firebase:
name: Upload to Firebase
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [ build, sign ]
steps:
- name: Checkout the code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Download signed APK
uses: actions/download-artifact@2a5974104b6d5dbdb2f9468a3e54da3bdd241578
with:
name: bisq-release-signed.apk
path: app/build/outputs/apk/release
- name: Download signed AAB
uses: actions/download-artifact@2a5974104b6d5dbdb2f9468a3e54da3bdd241578
with:
name: bisq-release-signed.aab
path: app/build/outputs/bundle/release
- name: Upload signed APK to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@55ea7b794b97be119d68165453207a1de5cea16d
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
file: app/build/outputs/apk/release/bisq-release-signed.apk
- name: Upload signed AAB to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@55ea7b794b97be119d68165453207a1de5cea16d
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
token: ${{ secrets.FIREBASE_TOKEN }}
file: app/build/outputs/bundle/release/bisq-release.aab