From b71b1eaba0f0b7d80cea5327195c65fbec58e822 Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:07:29 +0530 Subject: [PATCH 1/6] ci: add a pull request trigger --- .github/workflows/build-apks.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index c874c22e..19663718 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -6,6 +6,10 @@ on: # This allows you to manually trigger the workflow from the GitHub UI. workflow_dispatch: + pull_request: + branches: + - main + push: branches: - main From 918b3ffbcc577d10c009e1fe63f9b4fb0905c1b5 Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:22:13 +0530 Subject: [PATCH 2/6] ci: update to version gradle setup v4.. --- .github/workflows/build-apks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index 19663718..bcc9405f 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -46,7 +46,7 @@ jobs: KEYSTORE_PROPERTIES_BASE64: ${{ secrets.STAGING_KEYSTORE_PROPERTIES_BASE64 }} - name: Setup Gradle - uses: gradle/gradle-build-action@v3 + uses: gradle/gradle-build-action@v4 - name: Grant execute permission to gradlew run: chmod +x gradlew From a24edaa733e465c2bb2859c1ff9aad975eaaaa38 Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:23:39 +0530 Subject: [PATCH 3/6] chore: add a staging-keystore.properties --- .gitignore | 2 +- app/build.gradle.kts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5e5c4fc2..b2b85d35 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ .externalNativeBuild .cxx local.properties -keystore.properties +*keystore.properties *.jks /.kotlin /release diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3520897b..8cf118cb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -45,7 +45,7 @@ android { } create("staging") { - val keystorePropertiesFile = rootProject.file("keystore.properties") + val keystorePropertiesFile = rootProject.file("staging-keystore.properties") if (keystorePropertiesFile.exists()) { val keystoreProperties = Properties() keystoreProperties.load(FileInputStream(keystorePropertiesFile)) @@ -102,10 +102,10 @@ android { } create("staging") { - if (rootProject.file("keystore.properties").exists()) { + if (rootProject.file("staging-keystore.properties").exists()) { signingConfig = signingConfigs.getByName("staging") } else { - logger.warn("WARNING: Staging build will not be signed as keystore.properties is missing.") + logger.warn("WARNING: Staging build will not be signed as staging-keystore.properties is missing.") // throw GradleException("Can't Sign Staging Build") } From 2513ed47348b378a157f767d38e2e350cb11cfdc Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:26:54 +0530 Subject: [PATCH 4/6] ci: update workflow --- .github/workflows/build-apks.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index bcc9405f..4c8e8060 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -27,12 +27,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - - name: Decode Keystore run: | echo "$KEYSTORE_BASE64" | base64 --decode > passcodes-staging.jks @@ -41,10 +35,16 @@ jobs: - name: Decode Keystore Properties run: | - echo "$KEYSTORE_PROPERTIES_BASE64" | base64 --decode > keystore.properties + echo "$KEYSTORE_PROPERTIES_BASE64" | base64 --decode > staging-keystore.properties env: KEYSTORE_PROPERTIES_BASE64: ${{ secrets.STAGING_KEYSTORE_PROPERTIES_BASE64 }} + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + - name: Setup Gradle uses: gradle/gradle-build-action@v4 From 1048f9e1bd824b992dc746ef8b7726ba85b1d987 Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:31:17 +0530 Subject: [PATCH 5/6] ci: migrate the workflow to use gradle/action --- .github/workflows/build-apks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index 4c8e8060..b26cfc03 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -46,7 +46,7 @@ jobs: java-version: "17" - name: Setup Gradle - uses: gradle/gradle-build-action@v4 + uses: gradle/actions/setup-gradle@v4 - name: Grant execute permission to gradlew run: chmod +x gradlew From 90453212d3482fa8ca45c8173e35dfc77441b33b Mon Sep 17 00:00:00 2001 From: Jeel Dobariya Date: Sat, 23 Aug 2025 22:41:19 +0530 Subject: [PATCH 6/6] ci: remove pulls trigger --- .github/workflows/build-apks.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-apks.yml b/.github/workflows/build-apks.yml index b26cfc03..42333baa 100644 --- a/.github/workflows/build-apks.yml +++ b/.github/workflows/build-apks.yml @@ -6,10 +6,6 @@ on: # This allows you to manually trigger the workflow from the GitHub UI. workflow_dispatch: - pull_request: - branches: - - main - push: branches: - main @@ -69,7 +65,7 @@ jobs: echo "Triggered by push to 'main' branch. Building staging variant." BUILD_VARIANT="staging" ./gradlew assembleStaging - APK_PATH=app/build/outputs/apk/staging/app-universal-staging-unsigned.apk + APK_PATH=app/build/outputs/apk/staging/app-universal-staging.apk fi # Set the output variables for the next steps.