new: add signing to android
This commit is contained in:
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@@ -127,6 +127,23 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make ${{ matrix.platform }}-libs
|
make ${{ matrix.platform }}-libs
|
||||||
|
|
||||||
|
- name: Signing properties
|
||||||
|
env:
|
||||||
|
ANDROID_SIGNING_KEY_ALIAS: ${{ secrets.ANDROID_SIGNING_KEY_ALIAS }}
|
||||||
|
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
|
||||||
|
ANDROID_SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
|
||||||
|
ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }}
|
||||||
|
run: |
|
||||||
|
cd android
|
||||||
|
touch signing.properties
|
||||||
|
echo $ANDROID_SIGNING_KEY | base64 -d > release.keystore
|
||||||
|
echo "keystore.path=release.keystore" > release.properties
|
||||||
|
echo keystore.password="$ANDROID_SIGNING_STORE_PASSWORD" >> release.properties
|
||||||
|
echo key.alias="$ANDROID_SIGNING_KEY_ALIAS" >> release.properties
|
||||||
|
echo key.password="$ANDROID_SIGNING_KEY_PASSWORD" >> release.properties
|
||||||
|
cp release.* app/
|
||||||
|
cat release.properties
|
||||||
|
cd ..
|
||||||
- name: Release ${{ matrix.platform }}
|
- name: Release ${{ matrix.platform }}
|
||||||
run: |
|
run: |
|
||||||
make ${{ matrix.platform }}-release
|
make ${{ matrix.platform }}-release
|
||||||
|
|||||||
@@ -66,10 +66,19 @@ android {
|
|||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.release
|
||||||
|
}
|
||||||
|
}
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
def properties = new Properties()
|
||||||
|
properties.load(new FileInputStream(rootProject.file('release.properties')))
|
||||||
|
keyAlias properties['key.alias']
|
||||||
|
keyPassword properties['key.password']
|
||||||
|
storeFile file(properties['keystore.path'])
|
||||||
|
storePassword properties['keystore.password']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
|
|||||||
Reference in New Issue
Block a user