Introduced upload_bundle feature in info.json file.

*  When it set to true, it will upload the bundle to the play store. Otherwise, it will upload the APK.
* To adapt this feature we have modified our CI.
* For this change we have modified all the info.json files.
This commit is contained in:
MohitMaliFtechiz 2023-12-28 12:59:37 +05:30
parent 0a83488362
commit 26222a3961
23 changed files with 62 additions and 22 deletions

View File

@ -30,6 +30,19 @@ jobs:
- name: Set tag variable
run: echo "TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
- name: Install jq
run: sudo apt-get install -y jq
- name: Should upload Bundle
run: |
cd ${TAG}
should_publish_bundle=$(jq -r '.upload_bundle // empty' info.json)
if [ "$should_publish_bundle" == 'true' ]; then
echo "should_publish_bundle=true" >> $GITHUB_ENV
else
echo "should_publish_bundle=false" >> $GITHUB_ENV
fi
- name: Publishing app to Google Play
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
@ -38,7 +51,11 @@ jobs:
DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION: ${{ secrets.DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION }}
run: |
cd kiwix-android
eval "./gradlew publish${TAG^}ReleaseBundleWithPlayAssetDelivery"
if [ "${{ env.should_publish_bundle }}" == 'true' ]; then
eval "./gradlew publish${TAG^}ReleaseBundleWithPlayAssetDelivery"
else
eval "./gradlew publish${TAG^}ReleaseApkWithExpansionFile"
fi
publish_dummy_bundle:
runs-on: ubuntu-22.04

View File

@ -57,6 +57,8 @@ important fields are:
- `new`, A boolean value, when set to `true`, it triggers the creation
and storage of a dummy release Bundle during the current workflow
run.
- `upload_bundle` A boolean value. When set to true, it uploads the bundle to the Play Store,
Otherwise, it uploads the APK.
You can also create this new file using Github IO. Go to
https://github.com/kiwix/kiwix-android-custom/new/master and type

View File

@ -5,5 +5,6 @@
"disable_read_aloud": true,
"disable_title": true,
"disable_external_links": true,
"about_app_url": "https://www.dwds.de/a/"
"about_app_url": "https://www.dwds.de/a/",
"upload_bundle": true
}

View File

@ -5,5 +5,6 @@
"disable_sidebar": true,
"disable_tabs": true,
"disable_read_aloud": true,
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -5,5 +5,6 @@
"embed_zim": false,
"ic_launcher": "icon.png",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Encyclopédie de la Tunisie",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_fr_tunisie-app_maxi_2023-12.zim",
"enforced_lang": "fr",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Enciclopedia de Venezuela",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_es_venezuela-app_maxi_2023-12.zim",
"enforced_lang": "es",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Medical Wikipedia",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/mdwiki_en_all-app_maxi_2023-06.zim",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "ويكيبيديا الطبية",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_ar_medicine-app_maxi_2023-12.zim",
"enforced_lang": "ar",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikipedia Medizin (Offline)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_de_medicine-app_maxi_2023-12.zim",
"enforced_lang": "de",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikipedia Médica (Offline)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_es_medicine-app_maxi_2023-12.zim",
"enforced_lang": "es",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "ویکی‌پدیای پزشکی (آفلاین)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_fa_medicine-app_maxi_2023-12.zim",
"enforced_lang": "fa",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikipédia médicale",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_fr_medicine-app_maxi_2023-12.zim",
"enforced_lang": "fr",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "医療ウィキペディア(オフライン)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_ja_medicine-app_maxi_2023-12.zim",
"enforced_lang": "ja",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Offline WikiMed mini",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/mdwiki_en_all-app_mini_2023-12.zim",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "ମେଡିକାଲ ଉଇକିପିଡିଆ (ଅଫଲାଇନ)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_or_medicine-app_maxi_2023-12.zim",
"enforced_lang": "or",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikipédia Médica (Offline)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_pt_medicine-app_maxi_2023-12.zim",
"enforced_lang": "pt",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "醫學維基百科(離線版)",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikipedia_zh_medicine-app_maxi_2023-12.zim",
"enforced_lang": "zh",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "WikiSpecies",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikispecies_en_all-app_maxi_2023-12.zim",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikivoyage",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikivoyage_en_all-app_maxi_2023-06.zim",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikivoyage auf Deutsch",
"zim_url": "https://download.kiwix.org/zim/wikivoyage/wikivoyage_de_all_novid_2018-10.zim",
"enforced_lang": "de",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -2,5 +2,6 @@
"app_name": "Wikivoyage European Travels",
"zim_url": "https://mirror.download.kiwix.org/zim/.hidden/custom_apps/wikivoyage_en_europe-app_maxi_2023-09.zim",
"enforced_lang": "en",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}

View File

@ -39,5 +39,6 @@
"embed_zim": false,
"zim_url": "https://download.kiwix.org/zim/wikipedia/wikipedia_bm_all_maxi_2019-10.zim",
"enforced_lang": "bm",
"support_url": "https://www.kiwix.org/support"
"support_url": "https://www.kiwix.org/support",
"upload_bundle": false
}