-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,24 @@ jobs: | |
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
|
||
- name: Build release | ||
- name: Build release APK | ||
run: ./gradlew assembleRelease | ||
|
||
- name: Build release AAB | ||
run: ./gradlew bundleRelease | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: unsigned-app.apk | ||
path: app/build/outputs/apk/release/app-release-unsigned.apk | ||
if-no-files-found: error | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: unsigned-app.aab | ||
path: app/build/outputs/bundle/release/app-release.aab | ||
if-no-files-found: error | ||
|
||
deploy: | ||
name: Deploy to GitHub Releases | ||
needs: build | ||
|
@@ -37,14 +46,21 @@ jobs: | |
name: unsigned-app.apk | ||
path: . | ||
|
||
|
||
- name: Get the AAB | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: unsigned-app.aab | ||
path: . | ||
|
||
- name: Detect latest build tool version | ||
shell: bash | ||
run: | | ||
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | ||
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | ||
echo Latest build tool version is: $BUILD_TOOL_VERSION | ||
- name: Sign the APK | ||
- name: Sign the APK & AAB | ||
uses: r0adkll/sign-android-release@v1 | ||
id: sign_app | ||
with: | ||
|
@@ -56,6 +72,13 @@ jobs: | |
env: | ||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
|
||
- name: Debug | ||
run: | | ||
ls -l . | ||
echo "Signed file: ${{ steps.sign_app.outputs.signedReleaseFile }}" | ||
echo "Signed files: ${{ steps.sign_app.outputs.signedReleaseFiles }} | ||
echo "$GITHUB_ENV" | grep -i release | ||
- name: Publish the APK to GitHub Releases | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
|
@@ -65,10 +88,19 @@ jobs: | |
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish the APK to Google Play | ||
uses: r0adkll/upload-[email protected] | ||
- name: Publish the AAB to GitHub Releases | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} | ||
packageName: tech.httptoolkit.android.v1 | ||
releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }} | ||
track: production | ||
prerelease: true | ||
asset_name: httptoolkit.aab | ||
file: ${{ env.SIGNED_RELEASE_FILE_1 }} | ||
tag: ${{ github.ref }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Publish the AAB to Google Play | ||
# uses: r0adkll/[email protected] | ||
# with: | ||
# serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }} | ||
# packageName: tech.httptoolkit.android.v1 | ||
# releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile1 }} | ||
# track: production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters