Github Actions: Android (#176)

This PR includes two changes:

* fix Android's keystore generation (on recent Android environments)
* add a github action to generate Android builds

The github action is just an yml file that won't be used by anything other than github, so adding it here will be of no consequence for users or the project. But it will allow anyone that clones this project into GitHub (including ourselves, if we want to use this as a CI/CD stopgap solution) to have autogenerated apk's out of it.

The original intention (for #155) was to have an action also building an iOS app, but I don't know when will I go around to make that, and this would be useful to have integrated already, so I'm submitting the PR - and also useful as a base of work if someone else wants to make the iOS action.

Co-authored-by: Marcos Marado <mindboosternoori@gmail.com>
Reviewed-on: #176
Co-authored-by: Marcos Marado <marado@noreply@mills.io>
Co-committed-by: Marcos Marado <marado@noreply@mills.io>
master
Marcos Marado 6 days ago committed by James Mills
parent 19af2b463b
commit 035cc99026

@ -0,0 +1,26 @@
name: Android builds
on:
push:
branches: [master]
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7'
- run: flutter pub get
- run: "${GITHUB_WORKSPACE}/scripts/generate-keystore.sh GithubAction"
- run: flutter build apk
- run: flutter build appbundle
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: build/app/outputs/flutter-apk/app-release.apk

@ -12,7 +12,7 @@ if ! [ -f ./android/app/upload-keystore.jks ]; then
echo
ANDROID_KEY_STORE_PWD="$(random_string 12)"
ANDROID_KEY_PWD="$(random_string 12)"
ANDROID_KEY_PWD="$ANDROID_KEY_STORE_PWD"
echo "Generating keystore... "
echo

Loading…
Cancel
Save