Created
November 14, 2019 03:25
-
-
Save watura/f482023dfce5e50a01cc7a66214aa7b4 to your computer and use it in GitHub Desktop.
flutter build and deploy android
This file contains hidden or 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
name: flutter_build_deploy_android | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: subosito/[email protected] | |
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