Created
October 17, 2019 06:32
-
-
Save tianhaoz95/720e4ebc056ff583f973e1f7be05eaab to your computer and use it in GitHub Desktop.
Flutter build artifact
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: Upload build artifact | |
on: | |
push: | |
branches: | |
- "master" | |
- "actions/*" | |
paths: | |
- "iwfpapp/**" | |
- ".github/**" | |
jobs: | |
deploy-web: | |
name: Deploy Web app | |
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: | |
flutter-version: '1.9.1+hotfix.4' | |
channel: 'stable' | |
- run: flutter channel master && flutter upgrade | |
- run: flutter config --enable-web | |
- run: cd ./iwfpapp && flutter create . | |
- run: cd ./iwfpapp && flutter build web | |
- name: upload artifects | |
uses: actions/upload-artifact@master | |
with: | |
name: web-app | |
path: iwfpapp/build/web | |
deploy-android: | |
name: Deploy Android app | |
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: | |
flutter-version: '1.9.1+hotfix.4' | |
channel: 'stable' | |
- run: cd ./iwfpapp && flutter build apk --release | |
- name: upload artifects | |
uses: actions/upload-artifact@master | |
with: | |
name: android-app | |
path: iwfpapp/build/app/outputs | |
deploy-ios: | |
name: Deploy IOS app | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: '1.9.1+hotfix.4' | |
channel: 'stable' | |
- run: flutter channel master && flutter upgrade | |
- run: cd ./iwfpapp && flutter build ios --release --no-codesign | |
- name: upload artifects | |
uses: actions/upload-artifact@master | |
with: | |
name: ios-app | |
path: iwfpapp/build/ios/iphoneos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment