TP-71465 | Error handling in generate apk action
This commit is contained in:
12
.github/workflows/newBuild.yml
vendored
12
.github/workflows/newBuild.yml
vendored
@@ -130,10 +130,18 @@ jobs:
|
||||
|
||||
ls
|
||||
|
||||
chmod +r ./android/app/build/outputs/apk/${{ github.event.inputs.flavor || inputs.flavor }}${{github.event.inputs.environment || inputs.environment}}/${{github.event.inputs.type || inputs.type}}/app-${{github.event.inputs.flavor}}${{github.event.inputs.environment}}-release.apk
|
||||
apk_path="./android/app/build/outputs/apk/${{ github.event.inputs.flavor || inputs.flavor }}${{github.event.inputs.environment || inputs.environment}}/${{github.event.inputs.type || inputs.type}}/app-${{ github.event.inputs.flavor || inputs.flavor }}${{github.event.inputs.environment || inputs.environment}}-release.apk"
|
||||
|
||||
# Check if APK exists, exit if not
|
||||
if [ ! -f "$apk_path" ]; then
|
||||
echo "Error: APK file not found at $apk_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod +r "$apk_path"
|
||||
|
||||
curl --location --request PUT "$upload_url" \
|
||||
--data-binary "@./android/app/build/outputs/apk/${{ github.event.inputs.flavor || inputs.flavor }}${{github.event.inputs.environment || inputs.environment}}/${{github.event.inputs.type || inputs.type}}/app-fieldAgentsQA-release.apk"
|
||||
--data-binary "@$apk_path"
|
||||
|
||||
|
||||
echo "upload compleate"
|
||||
|
||||
Reference in New Issue
Block a user