Skip to content

Commit

Permalink
use key.properties instead
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryQuan committed Nov 25, 2023
1 parent ea27415 commit 279fd79
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ jobs:
echo "Keystore file does not exist."
exit 1
fi
- name: Provide key.properties
run: |
cd project
cd android
echo '${{ secrets.KEY_PROPERTIES }}' > key.properties
- name: Validate keystore & key.properties
run: |
cd project/android
if test -f key.properties && test -f app/keystore/android_keystore.jks; then
echo "Keystore and key.properties are valid."
else
exit 1
fi
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
Expand Down
10 changes: 4 additions & 6 deletions project/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ android {

signingConfigs {
release {
storeFile = file("keystore/android_keystore.jks")
storePassword System.getenv("SIGNING_STORE_PASSWORD")
keyAlias System.getenv("SIGNING_KEY_ALIAS")
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
debug {
Expand Down

0 comments on commit 279fd79

Please sign in to comment.