From a9c69c6e3d1be37f2983f63de1b92cde8b9156c8 Mon Sep 17 00:00:00 2001 From: cobalt-github-releaser-bot <95661244+cobalt-github-releaser-bot@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:09:22 -0700 Subject: [PATCH] Cherry pick PR #2937: Make android releases upload the APKs (#2948) Refer to the original PR: https://github.com/youtube/cobalt/pull/2937 Uploads Android APK bundle as a release artifact on release events. b/333300092 b/290121545 Co-authored-by: Kaido Kert --- .github/workflows/android_24.lts.1+.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/android_24.lts.1+.yaml b/.github/workflows/android_24.lts.1+.yaml index 18e7546ca54b..708c0c156859 100644 --- a/.github/workflows/android_24.lts.1+.yaml +++ b/.github/workflows/android_24.lts.1+.yaml @@ -55,6 +55,7 @@ jobs: needs: [ android-arm, android-arm64, android-x86 ] permissions: actions: write + contents: write steps: - name: Download arm-gold apk uses: actions/download-artifact@v4 @@ -94,3 +95,12 @@ jobs: retention-days: 90 compression-level: 0 # We expect kept artifacts to be already compressed if-no-files-found: error + - name: Make a release zip + run: zip -0 -r "Android APKs.zip" . -i '*.apk' + - name: Upload the APKs to a release + if: ${{ github.event_name == 'release' }} + uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2.9.0 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: "Android APKs.zip" + overwrite: true