|
42 | 42 | - name: Build Android debug
|
43 | 43 | run: flutter build appbundle --debug
|
44 | 44 |
|
| 45 | + - name: Setup bundletool |
| 46 | + if: github.ref == 'refs/heads/main' |
| 47 | + uses: amyu/setup-bundletool@f7a6fdd8e04bb23d2fdf3c2f60c9257a6298a40a |
| 48 | + - name: Install the google play key material |
| 49 | + if: github.ref == 'refs/heads/main' |
| 50 | + env: |
| 51 | + GOOGLE_PLAY_API_JWT_BASE64: ${{ secrets.GOOGLE_PLAY_API_JWT_BASE64 }} |
| 52 | + GOOGLE_PLAY_KEYSTORE_BASE64: ${{ secrets.GOOGLE_PLAY_KEYSTORE_BASE64 }} |
| 53 | + run: | |
| 54 | + GOOGLE_PLAY_API_JWT_PATH="$RUNNER_TEMP/gp_api.json" |
| 55 | + echo "GOOGLE_PLAY_API_JWT_PATH=$GOOGLE_PLAY_API_JWT_PATH" >> $GITHUB_ENV |
| 56 | + echo -n "$GOOGLE_PLAY_API_JWT_BASE64" | base64 --decode --output "$GOOGLE_PLAY_API_JWT_PATH" |
| 57 | +
|
| 58 | + GOOGLE_PLAY_KEYSTORE_PATH="$RUNNER_TEMP/gp_signing.jks" |
| 59 | + echo "GOOGLE_PLAY_KEYSTORE_PATH=$GOOGLE_PLAY_KEYSTORE_PATH" >> $GITHUB_ENV |
| 60 | + echo -n "$GOOGLE_PLAY_KEYSTORE_BASE64" | base64 --decode --output "$GOOGLE_PLAY_KEYSTORE_PATH" |
| 61 | + - name: Generate debug apk |
| 62 | + if: github.ref == 'refs/heads/main' |
| 63 | + env: |
| 64 | + TOKEN: ${{ secrets.MACHINE_USER_PAT }} |
| 65 | + GOOGLE_PLAY_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_PLAY_KEYSTORE_PASSWORD }} |
| 66 | + run: | |
| 67 | + bundletool build-apks \ |
| 68 | + --bundle=build/app/outputs/bundle/debug/app-debug.aab \ |
| 69 | + --output=build/app/outputs/apk/debug/app-debug.apks \ |
| 70 | + --mode=universal \ |
| 71 | + --ks=$GOOGLE_PLAY_KEYSTORE_PATH \ |
| 72 | + --ks-key-alias=key \ |
| 73 | + --ks-pass=pass:$GOOGLE_PLAY_KEYSTORE_PASSWORD |
| 74 | + unzip -p build/app/outputs/apk/debug/app-debug.apks universal.apk > build/app/outputs/apk/debug/app-debug.apk |
| 75 | + - name: Collect debug apk |
| 76 | + if: github.ref == 'refs/heads/main' |
| 77 | + uses: actions/upload-artifact@v3 |
| 78 | + with: |
| 79 | + name: app-debug.apk |
| 80 | + path: build/app/outputs/apk/debug/app-debug.apk |
| 81 | + retention-days: 60 |
| 82 | + |
45 | 83 | build-ios:
|
46 | 84 | name: iOS
|
47 | 85 | runs-on: macos-latest
|
|
0 commit comments