7
7
push :
8
8
branches : [main]
9
9
10
-
11
10
jobs :
12
11
build-sign-android :
13
12
name : Build and sign Android
14
- runs-on : ubuntu-latest
15
-
13
+ runs-on : macos-12
14
+
16
15
steps :
17
16
- uses : actions/checkout@v3
18
17
19
18
- uses : actions/setup-java@v3
20
19
with :
21
- distribution : ' zulu'
20
+ distribution : " zulu"
22
21
java-version : " 12.x"
23
- cache : ' gradle'
22
+ cache : " gradle"
24
23
25
24
- name : Setup Flutter SDK
26
25
uses : subosito/flutter-action@v2
27
26
with :
28
- channel : ' stable'
29
- flutter-version : ' 3.3.10'
27
+ channel : " stable"
28
+ flutter-version : " 3.3.10"
30
29
cache : true
31
30
32
31
- name : Create the Keystore
33
-
34
32
env :
35
- KEYSTORE_BASE64 : ${{ secrets.ANDROID_SIGN_KEY_CONTENT }}
36
- run : |
37
- # import keystore from secrets
38
- echo $KEYSTORE_BASE64 | base64 -d > $RUNNER_TEMP/my_production.keystore
33
+ KEY_JKS : ${{ secrets.KEY_JKS }}
34
+ working-directory : ./mobile
35
+ run : echo $KEY_JKS | base64 -d > android/key.jks
39
36
40
- - name : Restore packages
37
+ - name : Get Packages
41
38
working-directory : ./mobile
42
39
run : flutter pub get
43
40
44
41
- name : Build Android App Bundle
45
42
working-directory : ./mobile
43
+ env :
44
+ ALIAS : ${{ secrets.ALIAS }}
45
+ ANDROID_KEY_PASSWORD : ${{ secrets.ANDROID_KEY_PASSWORD }}
46
+ ANDROID_STORE_PASSWORD : ${{ secrets.ANDROID_STORE_PASSWORD }}
46
47
run : flutter build apk --release
47
48
48
- - name : Sign Android App Bundle
49
- working-directory : ./mobile
50
- run : jarsigner -keystore $RUNNER_TEMP/my_production.keystore -storepass ${{ secrets.ANDROID_KEY_PASSWORD }} -keypass ${{ secrets.ANDROID_STORE_PASSWORD }} -sigalg SHA256withRSA -digestalg SHA-256 -signedjar build/app/outputs/apk/release/app-release-signed.apk build/app/outputs/apk/release/*.apk ${{ secrets.ALIAS }}
51
-
52
49
- name : Publish Android Artifact
53
50
uses : actions/upload-artifact@v3
54
51
with :
55
52
name : release-apk-signed
56
- path : mobile/build/app/outputs/apk/release/ app-release-signed .apk
53
+ path : mobile/build/app/outputs/flutter- apk/app-release.apk
0 commit comments