Skip to content

Commit

Permalink
The testing_release job is skipped, if the application is being uploa…
Browse files Browse the repository at this point in the history
…ded 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.
  • Loading branch information
MohitMaliDeveloper committed Jan 4, 2025
1 parent 66f3d4d commit befd7d3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/testing_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit befd7d3

Please sign in to comment.