From c80cb687e0ddd94a207c7d9d8ab65538b61a5e3a Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 00:08:43 +0400 Subject: [PATCH 01/10] Support AAB --- action.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 9f9d52c..9fab694 100644 --- a/action.yml +++ b/action.yml @@ -25,6 +25,10 @@ inputs: description: 'Build variant' required: false default: 'debug' + aab: + description: 'Build Android App Bundle instead of APK' + required: false + default: false rock-build-extra-params: description: 'Extra parameters to pass to "rock build:android"' required: false @@ -240,6 +244,7 @@ runs: run: | npx rock build:android \ --variant "${{ inputs.variant }}" \ + ${{ inputs.aab == 'true' && '--aab' || '' }} \ ${{ inputs.rock-build-extra-params }} shell: bash working-directory: ${{ inputs.working-directory }} @@ -247,20 +252,20 @@ runs: - name: Find Build Artifact if: ${{ !env.ARTIFACT_URL }} run: | - APK_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.apk' | head -1 ) - echo APK_PATH $APK_PATH - echo "ARTIFACT_PATH=$APK_PATH" >> $GITHUB_ENV + BINARY_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.${{ inputs.aab == 'true' && 'aab' || 'apk' }}' | head -1 ) + echo BINARY_PATH $BINARY_PATH + echo "ARTIFACT_PATH=$BINARY_PATH" >> $GITHUB_ENV shell: bash - - name: Download and Unpack APK + - name: Download and Unpack Binary if: ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' }} run: | DOWNLOAD_OUTPUT=$(npx rock remote-cache download --name ${{ env.ARTIFACT_NAME }} --json) || (echo "$DOWNLOAD_OUTPUT" && exit 1) - APK_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path') - echo "ARTIFACT_PATH=$APK_PATH" >> $GITHUB_ENV + BINARY_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path') + echo "ARTIFACT_PATH=$BINARY_PATH" >> $GITHUB_ENV shell: bash - - name: Re-sign APK + - name: Re-sign Binary if: ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' }} run: | npx rock sign:android ${{ env.ARTIFACT_PATH }} \ @@ -342,6 +347,6 @@ runs: if: ${{ github.event_name == 'pull_request' && inputs.comment-bot == 'true' }} uses: callstackincubator/android/.github/actions/rock-post-build@v3 with: - title: Android ${{ inputs.variant }} APK for all devices + title: Android ${{ inputs.variant }} Binary for all devices artifact-url: ${{ steps.upload-artifact.outputs.artifact-url || env.ARTIFACT_URL }} github-token: ${{ inputs.github-token }} From 7392d0e47e1617d3b5225e72a3891bec38a41d88 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 00:48:52 +0400 Subject: [PATCH 02/10] Build Type --- action.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 9fab694..f91182f 100644 --- a/action.yml +++ b/action.yml @@ -120,6 +120,12 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} + - name: Set Build Type Env + id: build-type + run: echo "BUILD_TYPE=${{ inputs.aab == 'true' && 'aab' || 'apk' }}" >> $GITHUB_ENV + shell: bash + working-directory: ${{ inputs.working-directory }} + - name: Get Provider Name run: | PROVIDER_NAME=$(npx rock remote-cache get-provider-name) || (echo "$PROVIDER_NAME" && exit 1) @@ -137,7 +143,7 @@ runs: - name: Check if PR-related artifact exists if: ${{ github.event_name == 'pull_request' && inputs.re-sign == 'true' }} run: | - ARTIFACT_TRAITS="${{ inputs.variant }},${{ github.event.pull_request.number}}" + ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }},${{ github.event.pull_request.number}}" echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json) || (echo "$OUTPUT" && exit 1) @@ -151,7 +157,7 @@ runs: - name: Check if regular artifact exists if: ${{ !env.ARTIFACT_NAME }} run: | - ARTIFACT_TRAITS="${{ inputs.variant }}" + ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }}" echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json) || (echo "$OUTPUT" && exit 1) @@ -244,7 +250,7 @@ runs: run: | npx rock build:android \ --variant "${{ inputs.variant }}" \ - ${{ inputs.aab == 'true' && '--aab' || '' }} \ + ${{ env.BUILD_TYPE == 'aab' && '--aab' || '' }} \ ${{ inputs.rock-build-extra-params }} shell: bash working-directory: ${{ inputs.working-directory }} @@ -281,7 +287,7 @@ runs: else IDENTIFIER=$(echo "$GITHUB_SHA" | cut -c1-7) fi - ARTIFACT_TRAITS="${{ inputs.variant }},${IDENTIFIER}" + ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }},${IDENTIFIER}" ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" echo "ARTIFACT_NAME=rock-android-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV From 0ac48545b4fbeff675336b70253bee3cff2a1dfd Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 12:27:34 +0400 Subject: [PATCH 03/10] less keystore variables --- action.yml | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/action.yml b/action.yml index f91182f..4f087dd 100644 --- a/action.yml +++ b/action.yml @@ -44,9 +44,6 @@ inputs: keystore-file: description: 'Path to the keystore file' required: false - keystore-store-file: - description: 'Keystore store file name' - required: false keystore-store-password: description: 'Keystore store password' required: false @@ -90,11 +87,6 @@ runs: exit 1 fi - if [ -z "${{ inputs.keystore-store-file }}" ]; then - echo " Input 'keystore-store-file' is required for signed builds." - exit 1 - fi - if [ -z "${{ inputs.keystore-store-password }}" ]; then echo "Input 'keystore-store-password' is required for signed builds." exit 1 @@ -188,25 +180,6 @@ runs: if: ${{ inputs.validate-gradle-wrapper == 'true' && !env.ARTIFACT_URL }} uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1 - - name: Create local gradle.properties - if: ${{ !env.ARTIFACT_URL && inputs.sign }} - run: | - mkdir -p $HOME/.gradle - touch $HOME/.gradle/gradle.properties - - # Android standard properties (auto-recognized by AGP) - echo "android.injected.signing.store.file=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.store.password=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.key.alias=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.key.password=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties - - # Rock custom properties (for apps that explicitly read them in signingConfigs) - echo "ROCK_UPLOAD_STORE_FILE=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties - shell: bash - - name: Determine Android sourceDir and appName if: ${{ !env.ARTIFACT_URL }} run: | @@ -242,8 +215,28 @@ runs: echo "${{ inputs.keystore-base64 }}" | base64 --decode > "$KEYSTORE_TARGET_PATH" echo "Successfully copied keystore base64 to target path: $KEYSTORE_TARGET_PATH" fi + echo "KEYSTORE_FILE_PATH=$KEYSTORE_TARGET_PATH" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} + + - name: Create local gradle.properties + if: ${{ !env.ARTIFACT_URL && inputs.sign }} + run: | + mkdir -p $HOME/.gradle + touch $HOME/.gradle/gradle.properties + + # Android standard properties (auto-recognized by AGP) + echo "android.injected.signing.store.file=${{ env.KEYSTORE_FILE_PATH }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.store.password=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.key.alias=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.key.password=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties + + # Rock custom properties (for apps that explicitly read them in signingConfigs) + echo "ROCK_UPLOAD_STORE_FILE=${{ env.KEYSTORE_FILE_PATH }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties + shell: bash - name: Build Android if: ${{ !env.ARTIFACT_URL }} From 77ebbe98765aef72eefcd51d82946175f50701e6 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 12:35:19 +0400 Subject: [PATCH 04/10] Update README.md --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index dd5b4f0..31024aa 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,12 @@ jobs: # keystore-file: 'path/to/your-keystore.jks' # Option 2: Use base64 encoded keystore (alternative to keystore-file) # keystore-base64: ${{ secrets.KEYSTORE_BASE64 }} - # keystore-store-file: 'your-keystore.jks' # keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} # keystore-key-alias: 'your-key-alias' # keystore-key-password: ${{ secrets.KEYSTORE_KEY_PASSWORD }} # keystore-path: 'tools/buildtools/upload-key.keystore' # Optional: for custom keystore locations + # For store AAB add this: + # aab: true ``` ## Inputs @@ -55,11 +56,11 @@ jobs: | `validate-gradle-wrapper` | Whether to validate the Gradle wrapper | No | `true` | | `setup-java` | Whether to run actions/setup-java action | No | `true` | | `variant` | Build variant (debug/release) | No | `debug` | +| `aab` | Build Android App Bundle instead of APK | No | `false` | | `sign` | Whether to sign the build with keystore | No | - | | `re-sign` | Re-sign the APK with new JS bundle | No | `false` | | `keystore-file` | Path to the keystore file | No | - | | `keystore-base64` | Base64 encoded keystore file | No | - | -| `keystore-store-file` | Keystore store file name | No | - | | `keystore-store-password` | Keystore store password | No | - | | `keystore-key-alias` | Keystore key alias | No | - | | `keystore-key-password` | Keystore key password | No | - | @@ -88,10 +89,10 @@ The action automatically sets `android.injected.signing.*` properties which are signingConfigs { release { // These hardcoded values will be automatically overridden - storeFile file('path/to/keystore.jks') - keyAlias 'placeholder' - storePassword 'placeholder' - keyPassword 'placeholder' + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' } } ``` @@ -103,10 +104,12 @@ For apps that explicitly read custom properties in their `build.gradle`, the act ```gradle signingConfigs { release { - storeFile file('path/to/keystore.jks') - keyAlias project.findProperty('ROCK_UPLOAD_KEY_ALIAS') ?: 'placeholder' - storePassword project.findProperty('ROCK_UPLOAD_STORE_PASSWORD') ?: 'placeholder' - keyPassword project.findProperty('ROCK_UPLOAD_KEY_PASSWORD') ?: 'placeholder' + if (project.hasProperty('ROCK_UPLOAD_STORE_FILE')) { + storeFile file(ROCK_UPLOAD_STORE_FILE) + storePassword ROCK_UPLOAD_STORE_PASSWORD + keyAlias ROCK_UPLOAD_KEY_ALIAS + keyPassword ROCK_UPLOAD_KEY_PASSWORD + } } } ``` @@ -114,7 +117,7 @@ signingConfigs { The following mappings are set: - `ROCK_UPLOAD_KEY_ALIAS` ← `inputs.keystore-key-alias` -- `ROCK_UPLOAD_STORE_FILE` ← `inputs.keystore-store-file` +- `ROCK_UPLOAD_STORE_FILE` ← `$ANDROID_SOURCE_DIR/$APP_NAME/inputs.keystore-path` (full path) - `ROCK_UPLOAD_STORE_PASSWORD` ← `inputs.keystore-store-password` - `ROCK_UPLOAD_KEY_PASSWORD` ← `inputs.keystore-key-password` From b05f7adc8cb5a61f656e2f1c81b7415cdcb5b902 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 14:55:43 +0400 Subject: [PATCH 05/10] Revert "less keystore variables" This reverts commit 0ac48545b4fbeff675336b70253bee3cff2a1dfd. --- action.yml | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/action.yml b/action.yml index 4f087dd..f91182f 100644 --- a/action.yml +++ b/action.yml @@ -44,6 +44,9 @@ inputs: keystore-file: description: 'Path to the keystore file' required: false + keystore-store-file: + description: 'Keystore store file name' + required: false keystore-store-password: description: 'Keystore store password' required: false @@ -87,6 +90,11 @@ runs: exit 1 fi + if [ -z "${{ inputs.keystore-store-file }}" ]; then + echo " Input 'keystore-store-file' is required for signed builds." + exit 1 + fi + if [ -z "${{ inputs.keystore-store-password }}" ]; then echo "Input 'keystore-store-password' is required for signed builds." exit 1 @@ -180,6 +188,25 @@ runs: if: ${{ inputs.validate-gradle-wrapper == 'true' && !env.ARTIFACT_URL }} uses: gradle/actions/wrapper-validation@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1 + - name: Create local gradle.properties + if: ${{ !env.ARTIFACT_URL && inputs.sign }} + run: | + mkdir -p $HOME/.gradle + touch $HOME/.gradle/gradle.properties + + # Android standard properties (auto-recognized by AGP) + echo "android.injected.signing.store.file=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.store.password=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.key.alias=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties + echo "android.injected.signing.key.password=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties + + # Rock custom properties (for apps that explicitly read them in signingConfigs) + echo "ROCK_UPLOAD_STORE_FILE=${{ inputs.keystore-store-file }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties + echo "ROCK_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties + shell: bash + - name: Determine Android sourceDir and appName if: ${{ !env.ARTIFACT_URL }} run: | @@ -215,28 +242,8 @@ runs: echo "${{ inputs.keystore-base64 }}" | base64 --decode > "$KEYSTORE_TARGET_PATH" echo "Successfully copied keystore base64 to target path: $KEYSTORE_TARGET_PATH" fi - echo "KEYSTORE_FILE_PATH=$KEYSTORE_TARGET_PATH" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} - - - name: Create local gradle.properties - if: ${{ !env.ARTIFACT_URL && inputs.sign }} - run: | - mkdir -p $HOME/.gradle - touch $HOME/.gradle/gradle.properties - - # Android standard properties (auto-recognized by AGP) - echo "android.injected.signing.store.file=${{ env.KEYSTORE_FILE_PATH }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.store.password=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.key.alias=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties - echo "android.injected.signing.key.password=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties - - # Rock custom properties (for apps that explicitly read them in signingConfigs) - echo "ROCK_UPLOAD_STORE_FILE=${{ env.KEYSTORE_FILE_PATH }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_STORE_PASSWORD=${{ inputs.keystore-store-password }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_KEY_ALIAS=${{ inputs.keystore-key-alias }}" >> $HOME/.gradle/gradle.properties - echo "ROCK_UPLOAD_KEY_PASSWORD=${{ inputs.keystore-key-password }}" >> $HOME/.gradle/gradle.properties - shell: bash - name: Build Android if: ${{ !env.ARTIFACT_URL }} From b680fac8fa94cf5e9e3846bd803236ea2adb3d7b Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Mon, 24 Nov 2025 14:56:35 +0400 Subject: [PATCH 06/10] Update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 31024aa..6a17206 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ jobs: # keystore-file: 'path/to/your-keystore.jks' # Option 2: Use base64 encoded keystore (alternative to keystore-file) # keystore-base64: ${{ secrets.KEYSTORE_BASE64 }} + # keystore-store-file: 'your-keystore.jks' # keystore-store-password: ${{ secrets.KEYSTORE_STORE_PASSWORD }} # keystore-key-alias: 'your-key-alias' # keystore-key-password: ${{ secrets.KEYSTORE_KEY_PASSWORD }} @@ -61,6 +62,7 @@ jobs: | `re-sign` | Re-sign the APK with new JS bundle | No | `false` | | `keystore-file` | Path to the keystore file | No | - | | `keystore-base64` | Base64 encoded keystore file | No | - | +| `keystore-store-file` | Keystore store file name | No | - | | `keystore-store-password` | Keystore store password | No | - | | `keystore-key-alias` | Keystore key alias | No | - | | `keystore-key-password` | Keystore key password | No | - | @@ -89,10 +91,10 @@ The action automatically sets `android.injected.signing.*` properties which are signingConfigs { release { // These hardcoded values will be automatically overridden - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' + storeFile file('path/to/keystore.jks') + keyAlias 'placeholder' + storePassword 'placeholder' + keyPassword 'placeholder' } } ``` @@ -104,12 +106,10 @@ For apps that explicitly read custom properties in their `build.gradle`, the act ```gradle signingConfigs { release { - if (project.hasProperty('ROCK_UPLOAD_STORE_FILE')) { - storeFile file(ROCK_UPLOAD_STORE_FILE) - storePassword ROCK_UPLOAD_STORE_PASSWORD - keyAlias ROCK_UPLOAD_KEY_ALIAS - keyPassword ROCK_UPLOAD_KEY_PASSWORD - } + storeFile file('path/to/keystore.jks') + keyAlias project.findProperty('ROCK_UPLOAD_KEY_ALIAS') ?: 'placeholder' + storePassword project.findProperty('ROCK_UPLOAD_STORE_PASSWORD') ?: 'placeholder' + keyPassword project.findProperty('ROCK_UPLOAD_KEY_PASSWORD') ?: 'placeholder' } } ``` @@ -117,7 +117,7 @@ signingConfigs { The following mappings are set: - `ROCK_UPLOAD_KEY_ALIAS` ← `inputs.keystore-key-alias` -- `ROCK_UPLOAD_STORE_FILE` ← `$ANDROID_SOURCE_DIR/$APP_NAME/inputs.keystore-path` (full path) +- `ROCK_UPLOAD_STORE_FILE` ← `inputs.keystore-store-file` - `ROCK_UPLOAD_STORE_PASSWORD` ← `inputs.keystore-store-password` - `ROCK_UPLOAD_KEY_PASSWORD` ← `inputs.keystore-key-password` From 2216aca45c2c232a63d8bcafc7db60e4576ceac5 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Sat, 10 Jan 2026 18:18:01 +0400 Subject: [PATCH 07/10] Update action.yml --- action.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index d603102..c1341a4 100644 --- a/action.yml +++ b/action.yml @@ -124,9 +124,10 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} - - name: Set Build Type Env + - name: Set Binary Ext id: build-type - run: echo "BUILD_TYPE=${{ inputs.aab == 'true' && 'aab' || 'apk' }}" >> $GITHUB_ENV + run: | + echo "BINARY_EXT=${{ inputs.aab == 'true' && 'aab' || 'apk' }}" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} @@ -147,7 +148,7 @@ runs: - name: Check if PR-related artifact exists if: ${{ github.event_name == 'pull_request' && inputs.re-sign == 'true' }} run: | - ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }},${{ github.event.pull_request.number}}" + ARTIFACT_TRAITS="${{ inputs.variant }},${{ github.event.pull_request.number}}" echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json) || (echo "$OUTPUT" && exit 1) @@ -161,7 +162,7 @@ runs: - name: Check if regular artifact exists if: ${{ !env.ARTIFACT_NAME }} run: | - ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }}" + ARTIFACT_TRAITS="${{ inputs.variant }}" echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV OUTPUT=$(npx rock remote-cache list -p android --traits "${ARTIFACT_TRAITS}" --json) || (echo "$OUTPUT" && exit 1) @@ -263,7 +264,7 @@ runs: - name: Find Build Artifact if: ${{ !env.ARTIFACT_URL }} run: | - BINARY_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.${{ inputs.aab == 'true' && 'aab' || 'apk' }}' | head -1 ) + BINARY_PATH=$(find $ANDROID_SOURCE_DIR/$APP_NAME/build/outputs -name '*.${{ env.BINARY_EXT }}' | head -1 ) echo BINARY_PATH $BINARY_PATH echo "ARTIFACT_PATH=$BINARY_PATH" >> $GITHUB_ENV shell: bash From 6569ed0ac182dce2c36f117f7e2e5d241f50a3a4 Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Sat, 10 Jan 2026 19:35:36 +0400 Subject: [PATCH 08/10] Update action.yml --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index c1341a4..01dee89 100644 --- a/action.yml +++ b/action.yml @@ -256,7 +256,7 @@ runs: run: | npx rock build:android \ --variant "${{ inputs.variant }}" \ - ${{ env.BUILD_TYPE == 'aab' && '--aab' || '' }} \ + ${{ env.BUILD_EXT == 'aab' && '--aab' || '' }} \ ${{ inputs.rock-build-extra-params }} shell: bash working-directory: ${{ inputs.working-directory }} @@ -297,7 +297,7 @@ runs: else IDENTIFIER=$(echo "$GITHUB_SHA" | cut -c1-7) fi - ARTIFACT_TRAITS="${{ inputs.variant }},${{ env.BUILD_TYPE }},${IDENTIFIER}" + ARTIFACT_TRAITS="${{ inputs.variant }},${IDENTIFIER}" ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" echo "ARTIFACT_NAME=rock-android-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV From c64c43fa3b2be59b9122d659003f4644c2472bbf Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Sat, 10 Jan 2026 19:36:09 +0400 Subject: [PATCH 09/10] Update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 01dee89..9d073ad 100644 --- a/action.yml +++ b/action.yml @@ -256,7 +256,7 @@ runs: run: | npx rock build:android \ --variant "${{ inputs.variant }}" \ - ${{ env.BUILD_EXT == 'aab' && '--aab' || '' }} \ + ${{ env.BINARY_EXT == 'aab' && '--aab' || '' }} \ ${{ inputs.rock-build-extra-params }} shell: bash working-directory: ${{ inputs.working-directory }} From 96744cc68dc1f056b5b81e64274bcace1804c57b Mon Sep 17 00:00:00 2001 From: Sharif Mahmoud Date: Sat, 10 Jan 2026 20:21:36 +0400 Subject: [PATCH 10/10] Update action.yml --- action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yml b/action.yml index 9d073ad..5ab57a0 100644 --- a/action.yml +++ b/action.yml @@ -125,11 +125,9 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Set Binary Ext - id: build-type run: | echo "BINARY_EXT=${{ inputs.aab == 'true' && 'aab' || 'apk' }}" >> $GITHUB_ENV shell: bash - working-directory: ${{ inputs.working-directory }} - name: Get Provider Name run: |