Updated uses: google-github-actions/setup-gcloud@v1 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub action to Build and deploy to Play Store | |
name: Build and deploy to Play Store | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Cache Flutter dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pub-cache | |
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: ${{ runner.os }}-pub-cache- | |
- uses: subosito/flutter-action@v1.5.3 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build release app bundle | |
run: flutter build appbundle --release | |
- name: Authenticate with Google Play Console | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
project_id: my-project-id | |
service_account_key: ${{ secrets.PLAY_STORE_AUTH_TOKEN }} | |
- name: Upload APK to Google Play Console | |
uses: google-github-actions/upload-google-play@master | |
with: | |
release_files: "build/app/outputs/bundle/release/app-release.aab" | |
track: "production" | |
package_name: "com.ibhavikmakwana.flutterplayground" | |
service_account_key: ${{ secrets.PLAY_STORE_AUTH_TOKEN }} |