Skip to content

Commit

Permalink
Refactored testing_release CD workflow to generate and publish the …
Browse files Browse the repository at this point in the history
…application on the Play Store based on a specified date, using a new tag format `internal_testing_v*` where `*` is replaced by the date, which is extracted and set as an environment variable to generate the app bundle for that date, defaulting to the current date if no date is provided, and uploading the generated app bundle to the Play Store.
  • Loading branch information
MohitMaliDeveloper committed Jan 3, 2025
1 parent 9b9d19f commit 887d543
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/testing_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
tags:
- 'internal_testing' # internal_testing Tag
- 'internal_testing_v*' # Dynamic date tag for internal testing

jobs:
publish:
Expand All @@ -29,10 +30,21 @@ jobs:
echo "$KEYSTORE" | base64 -d > kiwix-android.keystore
echo "$PLAYSTORE_JSON" > playstore.json
- name: Retrieve date from TAG
id: extract_date
run: |
if [[ "${GITHUB_REF}" =~ internal_testing_v([0-9]{4}-[0-9]{2}-[0-9]{2}) ]]; then
RELEASE_DATE="${BASH_REMATCH[1]}"
else
RELEASE_DATE=""
fi
echo "KIWIX_ANDROID_RELEASE_DATE=$RELEASE_DATE" >> $GITHUB_ENV
- name: Publish bundle in internal testing on Google Play
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KIWIX_ANDROID_RELEASE_DATE: ${{ env.KIWIX_ANDROID_RELEASE_DATE }}
run: |
./gradlew publishPlayStoreBundle --scan

0 comments on commit 887d543

Please sign in to comment.