The testing_release job is skipped, if the application is being uploaded with the same version as the previously uploaded one, and Play Store gives the error for same version code. This prevents the CD pipeline from failing due to this error, while for all other errors, the workflow will fail as expected.

This commit is contained in:
MohitMaliFtechiz 2025-01-04 16:24:47 +05:30
parent 66f3d4d7cd
commit befd7d389a

View File

@ -49,4 +49,16 @@ jobs:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KIWIX_ANDROID_RELEASE_DATE: ${{ env.KIWIX_ANDROID_RELEASE_DATE }}
run: |
./gradlew publishPlayStoreBundle --scan
OUTPUT=$(./gradlew publishPlayStoreBundle --scan 2>&1)
echo "$OUTPUT" > gradle_output.log
if echo "$OUTPUT" | grep -q "BUILD SUCCESSFUL"; then
echo "$OUTPUT"
exit 0
fi
if echo "$OUTPUT" | grep -q "Try another version code."; then
echo "Upload skipped because very same version. $OUTPUT"
exit 0
fi
echo "$OUTPUT"
exit 1