-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (57 loc) · 1.83 KB
/
Copy pathandroid-release.yml
File metadata and controls
58 lines (57 loc) · 1.83 KB
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
name: Android Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
working-dir: ./App
steps:
- uses: actions/checkout@v3
with:
ref: master
- name: Create the Keystore
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
working-directory: ${{env.working-dir}}
run: |
# import keystore from secrets
echo $KEYSTORE_BASE64 | base64 -d > android/app/keystore.jks
- uses: DamianReeves/write-file-action@master
with:
path: ${{env.working-dir}}/android/key.properties
contents: |
storePassword=${{secrets.KEYSTORE_PASS}}
keyPassword=${{secrets.KEYSTORE_PASS}}
keyAlias=key0
storeFile=keystore.jks
write-mode: overwrite
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Disable analytics
run: flutter --disable-analytics
working-directory: ${{env.working-dir}}
- name: Get dependencies
run: flutter pub get
working-directory: ${{env.working-dir}}
- name: Build Bundle
run: flutter build appbundle --release
working-directory: ${{env.working-dir}}
- name: Build APK
run: flutter build apk --release
working-directory: ${{env.working-dir}}
- name: Upload Android Release (Appbundle)
uses: actions/upload-artifact@v2
with:
name: Appbundle
path: App/build/app/outputs/bundle/release/app-release.aab
- name: Upload Android Release (APK)
uses: actions/upload-artifact@v2
with:
name: APK
path: App/build/app/outputs/apk/release/app-release.apk