diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25874ca..159f01f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,11 @@ jobs: - uses: subosito/flutter-action@v1 with: flutter-version: '1.17.0' - - run: flutter pub get - - run: flutter build apk --split-per-abi + env: + KEY_JKS: ${{ secrets.KEY_JKS }} + KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }} + ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }} + run: echo $KEY_JKS > key.jks && flutter pub get && flutter build apk --release --split-per-abi - name: Create a Release APK uses: ncipollo/release-action@v1 with: diff --git a/android/app/build.gradle b/android/app/build.gradle index 7739b3c..a7b5d56 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -54,10 +54,10 @@ android { signingConfigs { release { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] + storeFile keystoreProperties['storeFile'] + storePassword = "$System.env.KEY_PASSWORD" + keyAlias = "key" + keyPassword = "$System.env.ALIAS_PASSWORD" } }