From 286f42a24bec27c1f64e17436d610ee274521034 Mon Sep 17 00:00:00 2001 From: NidhiDixit09 <93544270+NidhiDixit09@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:09:34 -0700 Subject: [PATCH] Updated GHA workflow for debug signing --- .github/workflows/appium-automation.yml | 14 ++++++++++++++ Branch-SDK-Automation-TestBed/build.gradle | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/appium-automation.yml b/.github/workflows/appium-automation.yml index 20b7c76ea..90ccff92f 100644 --- a/.github/workflows/appium-automation.yml +++ b/.github/workflows/appium-automation.yml @@ -43,15 +43,29 @@ jobs: distribution: ${{ env.JAVA_DISTRIBUTION }} java-version: ${{ env.JAVA_VERSION }} # to reduce complexity, testbed app uses sdk as a project reference + - name: Decode Keystore + id: decode_keystore + uses: timheuer/base64-to-file@v1 + with: + fileName: 'Branch-SDK-Automation-TestBed/automationSigningKeys.jks' + encodedString: ${{ secrets.KEYSTORE }} - name: Build testbed app run: | cd sdk ./gradlew Branch-SDK-Automation-TestBed:assembleDebug + env: + SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} + SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} + SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} - name: Build Master testbed app for Reinstallation tests if: ${{ !( github.ref == 'refs/heads/master')}} run: | cd previousVersionSDK ./gradlew Branch-SDK-Automation-TestBed:assembleDebug + env: + SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} + SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} + SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} - name: Upload APK to BrowserStack run: | response=$(curl -X POST https://api-cloud.browserstack.com/app-automate/upload -u "${{ secrets.BROWSER_STACK_USER }}:${{ secrets.BROWSER_STACK_KEY }}" -F "file=@sdk/Branch-SDK-Automation-TestBed/build/outputs/apk/debug/Branch-SDK-Automation-TestBed-debug.apk") diff --git a/Branch-SDK-Automation-TestBed/build.gradle b/Branch-SDK-Automation-TestBed/build.gradle index a9fba94b9..fe94be03c 100644 --- a/Branch-SDK-Automation-TestBed/build.gradle +++ b/Branch-SDK-Automation-TestBed/build.gradle @@ -5,6 +5,14 @@ plugins { android { compileSdk 33 + signingConfigs { + debug { + keyAlias System.getenv("SIGNING_KEY_ALIAS") + keyPassword System.getenv("SIGNING_KEY_PASSWORD") + storeFile= file("Branch-SDK-Automation-TestBed/automationSigningKeys.jks") + storePassword System.getenv("SIGNING_STORE_PASSWORD") + } + } defaultConfig { applicationId "io.branch.branchandroiddemo" minSdk 21