diff --git a/.github/workflows/CI_STORE_DEPLOY_ANDROID.yaml b/.github/workflows/CI_STORE_DEPLOY_ANDROID.yaml index a181f35..648435b 100644 --- a/.github/workflows/CI_STORE_DEPLOY_ANDROID.yaml +++ b/.github/workflows/CI_STORE_DEPLOY_ANDROID.yaml @@ -52,13 +52,17 @@ jobs: - name: 📉 Run all app tests run: flutter test - build_aab: - name: Build AppBundle + deploy: + name: Deploy to Play Store runs-on: ubuntu-latest env: JAVA_VERSION: 17.0 FLUTTER_VERSION: 3.24.3 AAB_PATH: build/app/outputs/bundle/release/app-release.aab + KEYSTORE_PATH: android/upload-keystore.jks + KEY_PROPS_PATH: android/key.properties + SERVICE_ACCOUNT_PATH: store_credentials.json + PACKAGE_NAME: tech.bunnie.hub_finder needs: setup steps: - name: Checkout the code @@ -75,29 +79,6 @@ jobs: with: flutter-version: ${{ env.FLUTTER_VERSION }} - - name: Build aab - run: flutter build appbundle - - - name: Upload generated aab to the artifacts - uses: actions/upload-artifact@master - with: - name: aab-stores - path: ${{ env.AAB_PATH }} - - deploy: - name: Deploy to Play Store - runs-on: ubuntu-latest - env: - AAB_PATH: build/app/outputs/bundle/release/app-release.aab - KEYSTORE_PATH: android/upload-keystore.jks - KEY_PROPS_PATH: android/key.properties - SERVICE_ACCOUNT_PATH: store_credentials.json - PACKAGE_NAME: tech.bunnie.hub_finder - needs: build_aab - steps: - - name: Checkout the code - uses: actions/checkout@v3 - - name: Decode Android keystore run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > ${{ env.KEYSTORE_PATH }} @@ -107,10 +88,20 @@ jobs: - name: Decode Android Service Account run: echo "${{ secrets.PRODUCTION_CREDENTIAL_FILE }}" | base64 --decode > ${{ env.SERVICE_ACCOUNT_PATH }} + - name: Build aab + run: flutter build appbundle + + - name: Upload generated aab to the artifacts + uses: actions/upload-artifact@master + with: + name: aab-stores + path: ${{ env.AAB_PATH }} + - name: Deploy to Play Store (Internal testing) uses: r0adkll/upload-google-play@v1 with: + # serviceAccountJson: ${{ env.SERVICE_ACCOUNT_PATH }} serviceAccountJsonPlainText: '${{ secrets.SERVICE_ACCOUNT_JSON }}' packageName: ${{ env.PACKAGE_NAME }} releaseFiles: ${{ env.AAB_PATH }} - track: internal + track: production