diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index c6082d4e0..269619cf3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -176,16 +176,18 @@ jobs: - name: Rename apk file run: | + sanitized_branch_name=$(grep '^id=' android/app.properties | cut -d'=' -f2 | sed 's/com\.cakewallet\.test_//') cd build/app/outputs/flutter-apk mkdir test-apk - cp app-arm64-v8a-release.apk test-apk/${BRANCH_NAME}.apk - cp app-x86_64-release.apk test-apk/${BRANCH_NAME}_x86.apk + cp app-arm64-v8a-release.apk test-apk/${sanitized_branch_name}.apk + cp app-x86_64-release.apk test-apk/${sanitized_branch_name}_x86.apk - name: Find APK file id: find_apk run: | set -x - apk_file=$(ls build/app/outputs/flutter-apk/test-apk/${BRANCH_NAME}.apk || exit 1) + sanitized_branch_name=$(grep '^id=' android/app.properties | cut -d'=' -f2 | sed 's/com\.cakewallet\.test_//') + apk_file=$(ls build/app/outputs/flutter-apk/test-apk/${sanitized_branch_name}.apk || exit 1) echo "APK_FILE=$apk_file" >> $GITHUB_ENV - name: Write BRANCH_NAME to env run: echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV