chore: ui component #1
Workflow file for this run
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 CI/CD | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-android: | |
| name: Build Android APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: stable | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Analyze code | |
| run: flutter analyze | |
| - name: Run tests | |
| run: flutter test | |
| - name: Build APK | |
| run: flutter build apk --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: android-apk | |
| path: build/app/outputs/flutter-apk/app-release.apk | |
| - name: Distribute APK via Firebase | |
| run: | | |
| firebase appdistribution:distribute build/app/outputs/flutter-apk/app-release.apk \ | |
| --app ${{ secrets.FIREBASE_APP_ID }} \ | |
| --groups testers \ | |
| --token ${{ secrets.FIREBASE_TOKEN }} | |
| build-ios: | |
| name: Build iOS for TestFlight | |
| runs-on: macos-latest | |
| needs: build-android | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build iOS | |
| run: flutter build ios --release --no-codesign | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| - name: Install Fastlane | |
| run: gem install fastlane | |
| - name: Fastlane Match Setup | |
| run: | | |
| bundle exec fastlane match appstore | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| GIT_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTH }} | |
| - name: Deploy to TestFlight | |
| run: | | |
| cd ios | |
| fastlane beta | |
| env: | |
| APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} | |
| APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }} |