From c876524dbca871a37b9e9ebf0cb9dde3950e7ec4 Mon Sep 17 00:00:00 2001 From: Jetsada Machom Date: Thu, 30 May 2024 17:20:27 +0100 Subject: [PATCH] Update github action to sign apk --- .github/workflows/build-native.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index 822cfc1fee9..3e31fc00bed 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -280,19 +280,14 @@ jobs: runs-on: ubuntu-22.04 env: + DEBUG: n TARGET: ANDROIDFAT - TARGET_BIN: XCSoar-debug - TARGET_FINAL: XCSoar-debug + TARGET_BIN: XCSoar-release + TARGET_FINAL: XCSoar-release TARGET_EXT: apk NDK: r26d steps: - - name: set vars for push - if: github.event_name == 'push' - run: | - echo "DEBUG=n" >> $GITHUB_ENV - echo "TARGET_FINAL=XCSoar" >> $GITHUB_ENV - - id: checkout uses: actions/checkout@v4 with: @@ -356,12 +351,27 @@ jobs: USE_CCACHE=y \ V=2 + - uses: r0adkll/sign-android-release@v1 + name: Sign app APK + id: sign_app + with: + releaseDirectory: output/ANDROID/bin + signingKeyBase64: ${{ secrets.XCSOAR_JET_UPLOAD_KEY_JKS_BASE64 }} + alias: ${{ secrets.ALIAS }} + keyStorePassword: ${{ secrets.XCSOAR_JET_UPLOAD_KEY_JKS_PASSWORD }} + - name: upload artifact uses: actions/upload-artifact@v4 with: name: ${{ env.TARGET_FINAL }}-${{ env.git_hash }}.${{ env.TARGET_EXT }} path: output/ANDROID/bin/${{ env.TARGET_BIN }}.${{ env.TARGET_EXT }} + - name: upload artifact - signed + uses: actions/upload-artifact@v4 + with: + name: ${{ env.TARGET_FINAL }}-${{ env.git_hash }}-signed.${{ env.TARGET_EXT }} + path: ${{steps.sign_app.outputs.signedReleaseFile}} + - name: Deploy to Staging server if: | github.repository == 'XCSoar/XCSoar' &&