update ios firebase fastlane action #17
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: build_nightly | |
| on: | |
| push: | |
| # branches: | |
| # - develop | |
| workflow_dispatch: | |
| inputs: | |
| build_ios: | |
| type: boolean | |
| description: iOS | |
| default: true | |
| build_android: | |
| type: boolean | |
| description: Android | |
| default: true | |
| build_web: | |
| type: boolean | |
| description: Web | |
| default: true | |
| defaults: | |
| run: | |
| working-directory: sample_app | |
| env: | |
| FLUTTER_VERSION: "3.29.0" | |
| FLUTTER_CHANNEL: stable | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_and_deploy_ios: | |
| runs-on: macos-latest | |
| timeout-minutes: 40 | |
| if: ${{ github.event_name == 'push' || inputs.build_ios == true }} | |
| # if: false | |
| steps: | |
| - name: Install Bot SSH Key | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ env.FLUTTER_CHANNEL }} | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Setup Ruby and Gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| working-directory: sample_app/ios | |
| bundler-cache: true | |
| - name: Install firebase-tools | |
| run: npm install -g firebase-tools | |
| - name: Copy google service account | |
| run: | | |
| echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/ios/firebase-service-account.json | |
| - name: Build and release | |
| env: | |
| GOOGLE_APPLICATION_CREDENTIALS: "${{ github.workspace }}/sample_app/ios/firebase-service-account.json" | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} | |
| run: | | |
| flutter build ios --suppress-analytics --release --no-codesign | |
| cd ios | |
| bundle exec fastlane deploy_to_firebase | |
| build_and_deploy_android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # if: ${{ github.event_name == 'push' || inputs.build_android == true }} | |
| if: false | |
| steps: | |
| - name: Install Bot SSH Key | |
| uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Java | |
| uses: actions/setup-java@v1 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ env.FLUTTER_CHANNEL }} | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Build | |
| run: flutter build apk | |
| - name: Copy google service account | |
| run: | | |
| echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/android/firebase-service-account.json | |
| - name: Deploy | |
| uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
| with: | |
| appId: ${{secrets.SAMPLE_FIREBASE_ANDROID_APPID}} | |
| serviceCredentialsFile: "${{ github.workspace }}/sample_app/android/firebase-service-account.json" | |
| groups: stream-testers | |
| debug: true | |
| file: "${{ github.workspace }}/sample_app/build/app/outputs/flutter-apk/app-release.apk" | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-stream-chat-v1 | |
| path: "${{ github.workspace }}/sample_app/build/app/outputs/flutter-apk/app-release.apk" | |
| build_and_deploy_web: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| # if: ${{ github.event_name == 'push' || inputs.build_web == true }} | |
| if: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: config git | |
| run: | | |
| git config --global user.email "$(git log --format='%ae' HEAD^!)" | |
| git config --global user.name "$(git log --format='%an' HEAD^!)" | |
| git fetch origin gh-pages:gh-pages | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ env.FLUTTER_CHANNEL }} | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| cache: true | |
| - name: Build and Deploy | |
| uses: bluefireteam/flutter-gh-pages@v9 | |
| with: | |
| baseHref: /stream-chat-flutter/ | |
| workingDir: sample_app | |