diff --git a/.github/workflows/build_apk.yml b/.github/workflows/build_apk.yml index 643ad54000..f2a2e48fe3 100644 --- a/.github/workflows/build_apk.yml +++ b/.github/workflows/build_apk.yml @@ -13,28 +13,24 @@ jobs: working-directory: ./mobile steps: - uses: actions/checkout@v2 - - # Sign - - uses: r0adkll/sign-android-release@v1 - name: Sign app APK - # ID used to access action output - id: sign_app - with: - releaseDirectory: mobile/build/app/outputs/apk/release - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_PASSWORD }} - env: - # override default build-tools version (29.0.3) -- optional - BUILD_TOOLS_VERSION: "30.0.2" - + # Build - uses: subosito/flutter-action@v2 with: channel: "stable" cache: true cache-key: flutter2.10 # optional, change this to force refresh cache + env: + KEY_JKS: ${{ secrets.SIGNING_KEY }} + SIGNING_KEY_ALIAS: ${{ secrets.ALIAS }} + SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + SIGNING_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} + - name: Decode Keystore + run: | + echo "${{secrets.SIGNING_KEY}}" > release.keystore.asc + gpg -d --passphrase "${{secrets.KEY_STORE_PASSWORD}}" - - batch release.keystore.asc > android/key.jks + - name: Create key.properties + run: touch mobile/android/key.properties echo "storePassword= keyPassword= keyAlias= storeFile=../key.jks" > mobile/android/key.properties - run: flutter --version - run: flutter pub get - run: flutter build apk