Merge pull request #136 from krawieck/feature/ci-bundle

This commit is contained in:
Filip Krawczyk 2021-02-05 22:53:22 +01:00 committed by GitHub
commit 66d55d615b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 11 deletions

View File

@ -42,6 +42,7 @@ jobs:
run: flutter test
- name: Inject keystore
if: startsWith(github.ref, 'refs/tags/')
working-directory: android
env:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
@ -56,6 +57,17 @@ jobs:
echo $SIGNING_KEY | base64 -d | tee ~/key.jks >/dev/null
- name: Generate appbundle
if: startsWith(github.ref, 'refs/tags/')
run: flutter build appbundle
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: android-appbundle
path: |
build/app/outputs/bundle/release/app-release.aab
- name: Android build
run: flutter build apk --split-per-abi

View File

@ -51,19 +51,23 @@ android {
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
buildTypes {
release {
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug
}
}
}
}
flutter {