Updated Android & iOS #7
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
name: Flutter CI/CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Android & Web | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.19.5' # specify the Flutter version | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Build APK | |
run: flutter build apk --release | |
- name: Upload APK Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: android-app | |
path: build/app/outputs/flutter-apk/app-release.apk | |
- name: Build WEB | |
run: flutter build web --release | |
- name: Upload Web Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web-app | |
path: build/web/ | |
build_windows: | |
name: Build Windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Flutter | |
run: | | |
git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter | |
- name: Flutter Config | |
run: ${{ github.workspace }}\_flutter\bin\flutter.bat config --enable-windows-desktop | |
- name: Install Dependencies | |
run: ${{ github.workspace }}\_flutter\bin\flutter.bat pub get | |
- name: Build Windows Executable | |
run: ${{ github.workspace }}\_flutter\bin\flutter.bat build windows | |
- name: Upload Windows Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-app | |
path: build/windows/runner/Release/ | |
# build_ios: | |
# runs-on: macOS-latest | |
# steps: | |
# - name: Checkout Repository | |
# uses: actions/checkout@v2 | |
# | |
# - name: Setup Flutter | |
# uses: subosito/flutter-action@v2 | |
# with: | |
# flutter-version: '3.13.8' | |
# - name: Install CocoaPods | |
# run: | | |
# sudo gem install cocoapods | |
# cd ios | |
# pod install | |
# | |
# - name: Install Dependencies | |
# run: flutter pub get | |
# | |
# - name: Build iOS | |
# run: flutter build ios --release --no-codesign |