Created
April 20, 2020 10:01
-
-
Save apgapg/290f6f043516ee0f03977b34442cccc3 to your computer and use it in GitHub Desktop.
Github Action for Flutter Build, Test, Release and Upload app
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
# This is a basic workflow to help you get started with Actions | |
name: Test, Build, Release Demo app to Azure Storgae | |
# name: Test, Build and Release apk | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'dev' | |
- run: flutter pub get | |
- name: 'Run Test(s)' | |
run: flutter test | |
- name: 'Build Demo Apk' | |
run: flutter clean && flutter build apk --target lib/main_demo.dart --target-platform android-arm --flavor demo | |
- name: 'Upload Apk' | |
uses: wei/curl@v1 | |
with: | |
args: -X POST 'https://--your-url---.com/api/UploadApk?filename=release.apk' -F file=@build/app/outputs/apk/demo/release/app-demo-release.apk | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
flutter clean && flutter build apk
only but then you will need to change file location in last line