Skip to content

Commit

Permalink
Merge branch 'main' into Dwds_resource_bug_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gouri-panda authored Nov 10, 2023
2 parents 9b1645d + 31839f6 commit 712f0de
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 13 deletions.
61 changes: 60 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,63 @@ jobs:
DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION: ${{ secrets.DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION }}
run: |
cd kiwix-android
eval "./gradlew publish${TAG^}ReleaseBundleWithPlayAssetDelivery"
eval "./gradlew publish${TAG^}ReleaseBundleWithPlayAssetDelivery"
publish_dummy_bundle:
runs-on: ubuntu-22.04

steps:
- name: Retrieving custom app configuration
uses: actions/checkout@v3

- name: Retrieving Kiwix Android source code
run: git clone --depth=1 --single-branch --branch develop https://github.com/kiwix/kiwix-android.git

- name: Copying custom app configuration into Kiwix Android code base
run: ./copy_files_to_kiwix_android.sh

- name: Preparing signing material
env:
keystore: ${{ secrets.keystore }}
run: |
echo "$keystore" | base64 -d > kiwix-android/kiwix-android.keystore
- name: Set tag variable
run: echo "TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV

- name: Should upload dummy Bundle
run: |
cd ${TAG}
new=$(grep -o '"new": true' info.json)
if [ -n "$new" ]; then
echo "The 'new' attribute is true, proceeding to publish dummy bundle..."
else
echo "The 'new' attribute is not true, skipping the next job."
exit 0 # Skip the job as Bundle is already published on play store
fi
- name: Generate dummy Bundle
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION: ${{ secrets.DWDS_HTTP_BASIC_ACCESS_AUTHENTICATION }}
run: |
cd kiwix-android
eval "./gradlew bundle${TAG^}Release"
- name: Get Bundle name and path
id: bundle-path
run: |
BUNDLE_PATH="kiwix-android/custom/build/outputs/bundle/${TAG}Release/*${TAG}*.aab"
BUNDLE_NAME="${TAG^}DummyBundle.aab"
echo "bundle_path=$BUNDLE_PATH" >> $GITHUB_ENV
echo "bundle_name=$BUNDLE_NAME" >> $GITHUB_ENV
- name: Upload Bundle as an artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.bundle_name }}
path: ${{ env.bundle_path }}

34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ important fields are:
- `app_name`, the title of the app
- `zim_url`, the ZIM online URL (to download to create the app)
- `enforced_lang`, the language code of the content (and the app UI)
- `disable_sidebar`, a boolean value, when set to `true`, it hides the sidebar
- `disable_tabs`, a boolean value, when set to `true`, it deactivates the multi-tabs feature
- `disable_read_aloud`, a boolean value, when set to `true`, it disable the text-to-speech feature
- `new`, A boolean value, when set to `true`, it triggers the creation
and storage of a dummy release Bundle during the current workflow
run.

You can also create this new file using Github IO. Go to
https://github.com/kiwix/kiwix-android-custom/new/master and type
Expand Down Expand Up @@ -137,20 +143,24 @@ then Go to the [release

This triggers a [Github
action](https://github.com/kiwix/kiwix-android-custom/actions) that
will build an app using kiwix-android master branch and the icon
set/json defined in this repository and then upload it to the Play
Console in draft to alpha with an expansion file attached. Therefore,
go to the [Google Play Store Admin
dashboard](https://play.google.com/apps/publish) for the
corresponding app and go to menu "Publication management" > "App version":
under "Alpha", you can click on "Modify version". After a couple of hours
the new version of the app should be listed in the public Play Store.

Remark: This will only work with app updates. To create a new custom
app an app must be built manually and submit to the Google Play store
will build an app Bundle using kiwix-android master branch and the
illustrations/icons set/json defined in this repository.

The very first release has to be done manually. Put the `new`
[attribute](#description-json-file) so the release management action
provides you the dummy first bundle to upload.

All other further releases (without the `new` attribute in the
`json.info`) are then uploaded automatically to the Google Play app
store as draft. Therefore, once released, go then to the [Google Play
Store Admin dashboard](https://play.google.com/apps/publish) for the
corresponding app and go to menu "Publication management" > "App
version": under "Internal Testing", you can click on "Modify
version". After a couple of hours the new version of the app should
be listed in the public Play Store.

License
-------

[GPLv3](https://www.gnu.org/licenses/gpl-3.0) or later, see
[LICENSE](LICENSE) for more details.
[LICENSE](LICENSE) for more details.
Binary file added dwds/res/drawable-hdpi/ic_home_kiwix_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dwds/res/drawable-mdpi/ic_home_kiwix_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dwds/res/drawable-xhdpi/ic_home_kiwix_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dwds/res/drawable-xxhdpi/ic_home_kiwix_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 712f0de

Please sign in to comment.