@@ -16,15 +16,24 @@ jobs:
16
16
- name : Setup Android SDK
17
17
uses : android-actions/setup-android@v2
18
18
19
- - name : Build release
19
+ - name : Build release APK
20
20
run : ./gradlew assembleRelease
21
21
22
+ - name : Build release AAB
23
+ run : ./gradlew bundleRelease
24
+
22
25
- uses : actions/upload-artifact@v4
23
26
with :
24
27
name : unsigned-app.apk
25
28
path : app/build/outputs/apk/release/app-release-unsigned.apk
26
29
if-no-files-found : error
27
30
31
+ - uses : actions/upload-artifact@v4
32
+ with :
33
+ name : unsigned-app.aab
34
+ path : app/build/outputs/bundle/release/app-release.aab
35
+ if-no-files-found : error
36
+
28
37
deploy :
29
38
name : Deploy to GitHub Releases
30
39
needs : build
@@ -37,14 +46,21 @@ jobs:
37
46
name : unsigned-app.apk
38
47
path : .
39
48
49
+
50
+ - name : Get the AAB
51
+ uses : actions/download-artifact@v4
52
+ with :
53
+ name : unsigned-app.aab
54
+ path : .
55
+
40
56
- name : Detect latest build tool version
41
57
shell : bash
42
58
run : |
43
59
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
44
60
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
45
61
echo Latest build tool version is: $BUILD_TOOL_VERSION
46
62
47
- - name : Sign the APK
63
+ - name : Sign the APK & AAB
48
64
uses : r0adkll/sign-android-release@v1
49
65
id : sign_app
50
66
with :
@@ -56,19 +72,27 @@ jobs:
56
72
env :
57
73
BUILD_TOOLS_VERSION : ${{ env.BUILD_TOOL_VERSION }}
58
74
59
- - name : Publish the APK to GitHub Releases
75
+ - name : List release files
76
+ run : ls -l
77
+
78
+ - name : Rename release files
79
+ run : |
80
+ mv ./app-release-unsigned-signed.apk ./httptoolkit.apk
81
+ mv ./app-release.aab ./httptoolkit.aab
82
+
83
+ - name : Publish the APK & AAB to GitHub Releases
60
84
uses : svenstaro/upload-release-action@v2
61
85
with :
62
86
prerelease : true
63
- asset_name : httptoolkit.apk
64
- file : ${{ steps.sign_app.outputs.signedReleaseFile }}
87
+ file : ./ httptoolkit{ .apk,.aab}
88
+ file_glob : true
65
89
tag : ${{ github.ref }}
66
90
repo_token : ${{ secrets.GITHUB_TOKEN }}
67
91
68
- - name : Publish the APK to Google Play
92
+ - name : Publish the AAB to Google Play
69
93
70
94
with :
71
95
serviceAccountJsonPlainText : ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
72
96
packageName : tech.httptoolkit.android.v1
73
- releaseFiles : ${{ steps.sign_app.outputs.signedReleaseFile }}
97
+ releaseFiles : ./httptoolkit.aab
74
98
track : production
0 commit comments