Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
flutter build and deploy android
name: flutter_build_deploy_android
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1.1.1
with:
channel: 'dev'
- name: Create key.properties
run: |
echo 'storePassword=${{ secrets.ANDROID_STORE_PASSWORD }}' > android/key.properties
echo 'keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}' >> android/key.properties
echo 'keyAlias=key' >> android/key.properties
echo 'storeFile=key.jks' >> android/key.properties
- name: Build APK
run: |
flutter pub get
flutter build apk
- name: Archive apk
uses: actions/upload-artifact@v1
with:
name: app.apk
path: build/app/outputs/apk/release/app-release.apk
- name: Use Node.js 8.x
uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Install Firebase
run: yarn install
- name: Upload APK
run: yarn run firebase appdistribution:distribute build/app/outputs/apk/release/app-release.apk --app "${{ secrets.ANDROID_APP_ID }}" --groups GROUP --token "${{ secrets.FIREBASE_TOKEN }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.