new: add signing to android

This commit is contained in:
Hiddify
2023-08-22 08:39:40 +00:00
parent 8229008393
commit f22812f11b
2 changed files with 28 additions and 2 deletions

View File

@@ -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

View File

@@ -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