-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (54 loc) · 1.85 KB
/
android.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
name: Android
on: push
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.22.2'
- name: Find and Replace OpenAIP
uses: richardrigutins/replace-in-files@v2
with:
files: '**/*.dart'
search-text: '@@___openaip_client_id__@@'
replacement-text: ${{ secrets.OPENAIP_CLIENT_ID }}
encoding: 'utf8'
max-parallelism: 10
- name: Install project dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --release
- name: Sign APK with keystore
uses: r0adkll/sign-android-release@v1
id: sign_apk
with:
releaseDirectory: build/app/outputs/apk/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASS }}
keyPassword: ${{ secrets.KEY_STORE_PASS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Build AAB
run: flutter build appbundle --release
- name: Sign AAB with keystore
uses: r0adkll/sign-android-release@v1
id: sign_aab
with:
releaseDirectory: build/app/outputs/bundle/release
signingKeyBase64: ${{ secrets.KEY_STORE }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASS }}
keyPassword: ${{ secrets.KEY_STORE_PASS }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: Android
path: |
${{steps.sign_apk.outputs.signedReleaseFile}}
${{steps.sign_aab.outputs.signedReleaseFile}}