From c50d0fc6dd0299443f046bef6eb0197f859d841e Mon Sep 17 00:00:00 2001 From: sethforprivacy <40500387+sethforprivacy@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:56:21 -0400 Subject: [PATCH] ci: sanitize branch name when naming test APK in reusable-build The 'Rename apk file'/'Find APK file' steps used the raw ${BRANCH_NAME} as an APK filename, so any branch containing a '/' (e.g. claude/*) made cp target a non-existent test-apk// subdirectory and failed the build. Derive the sanitized branch name from android/app.properties, the same approach already used in automated_integration_test.yml. --- .github/workflows/reusable-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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