Skip to content

Commit e13cf10

Browse files
authored
Fix APK naming conflict in android-build.yml nightly releases (#163)
1 parent e3e2326 commit e13cf10

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/android-build.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ jobs:
6161
./gradlew build --no-daemon
6262
fi
6363
64+
- name: Rename APKs with demo name
65+
working-directory: ${{ matrix.path }}/app/build/outputs/apk/
66+
run: |
67+
find . -name "*.apk" -type f -print0 | while IFS= read -r -d '' apk; do
68+
dir=$(dirname "$apk")
69+
filename=$(basename "$apk")
70+
new_name=$(echo "$filename" | sed "s/\.apk$/-${{ matrix.name }}.apk/")
71+
echo "Renaming $apk to $dir/$new_name"
72+
mv "$apk" "$dir/$new_name"
73+
done
74+
6475
- name: Upload build artifacts
6576
uses: actions/upload-artifact@v4
6677
with:
@@ -95,8 +106,8 @@ jobs:
95106
Automated nightly build of Android demo applications.
96107
97108
## Apps included:
98-
- LlamaDemo APK
99-
- DeepLabV3Demo APK
109+
- LlamaDemo APKs (`app-debug-LlamaDemo.apk`, `app-release-unsigned-LlamaDemo.apk`)
110+
- DeepLabV3Demo APKs (`app-debug-DeepLabV3Demo.apk`, `app-release-unsigned-DeepLabV3Demo.apk`)
100111
101112
**Build Date:** ${{ steps.tag.outputs.build_date }}
102113
**Commit:** ${{ github.sha }}

0 commit comments

Comments
 (0)