Skip to content

Commit 708ec8e

Browse files
committed
Add AAB publishing (required for Android TV)
1 parent c9a1ed4 commit 708ec8e

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

.github/workflows/ci.yml

+31-7
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,24 @@ jobs:
1616
- name: Setup Android SDK
1717
uses: android-actions/setup-android@v2
1818

19-
- name: Build release
19+
- name: Build release APK
2020
run: ./gradlew assembleRelease
2121

22+
- name: Build release AAB
23+
run: ./gradlew bundleRelease
24+
2225
- uses: actions/upload-artifact@v4
2326
with:
2427
name: unsigned-app.apk
2528
path: app/build/outputs/apk/release/app-release-unsigned.apk
2629
if-no-files-found: error
2730

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+
2837
deploy:
2938
name: Deploy to GitHub Releases
3039
needs: build
@@ -37,14 +46,21 @@ jobs:
3746
name: unsigned-app.apk
3847
path: .
3948

49+
50+
- name: Get the AAB
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: unsigned-app.aab
54+
path: .
55+
4056
- name: Detect latest build tool version
4157
shell: bash
4258
run: |
4359
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
4460
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
4561
echo Latest build tool version is: $BUILD_TOOL_VERSION
4662
47-
- name: Sign the APK
63+
- name: Sign the APK & AAB
4864
uses: r0adkll/sign-android-release@v1
4965
id: sign_app
5066
with:
@@ -56,19 +72,27 @@ jobs:
5672
env:
5773
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
5874

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
6084
uses: svenstaro/upload-release-action@v2
6185
with:
6286
prerelease: true
63-
asset_name: httptoolkit.apk
64-
file: ${{ steps.sign_app.outputs.signedReleaseFile }}
87+
file: ./httptoolkit{.apk,.aab}
88+
file_glob: true
6589
tag: ${{ github.ref }}
6690
repo_token: ${{ secrets.GITHUB_TOKEN }}
6791

68-
- name: Publish the APK to Google Play
92+
- name: Publish the AAB to Google Play
6993
uses: r0adkll/[email protected]
7094
with:
7195
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
7296
packageName: tech.httptoolkit.android.v1
73-
releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }}
97+
releaseFiles: ./httptoolkit.aab
7498
track: production

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "tech.httptoolkit.android.v1"
1010
minSdkVersion 21
1111
targetSdkVersion 33
12-
versionCode 33
13-
versionName "1.4.0"
12+
versionCode 34
13+
versionName "1.5.0"
1414

1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616

0 commit comments

Comments
 (0)