Skip to content

Merge pull request #104 from GetStream/fix/web-build #765

Merge pull request #104 from GetStream/fix/web-build

Merge pull request #104 from GetStream/fix/web-build #765

Workflow file for this run

name: build_nightly
on:
push:
branches:
- develop
workflow_dispatch:
defaults:
run:
working-directory: packages/stream_chat_v1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_deploy_ios:
runs-on: macos-latest
timeout-minutes: 40
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Setup Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: packages/stream_chat_v1/ios
bundler-cache: true
- name: Install firebase-tools
run: npm install -g firebase-tools
- name: Build and release
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
run: |
flutter build ios --no-codesign
cd ios
bundle exec fastlane deploy_to_firebase
build_and_deploy_android:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Build
run: flutter build apk
- name: Deploy
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_ANDROID_APPID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: stream-testers
debug: true
file: packages/stream_chat_v1/build/app/outputs/apk/release/app-release.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: android-stream-chat-v1
path: packages/stream_chat_v1/build/app/outputs/apk/release/app-release.apk
build_and_deploy_web:
runs-on: ubuntu-latest
timeout-minutes: 10
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: stable
cache: true
# https://github.com/flutter/flutter/issues/160127
flutter-version: 3.24.5
- name: Copy production config
run: echo "${{ secrets.PRODUCTION_CONFIG }}" > lib/app_config.dart
- name: Build and Deploy
uses: bluefireteam/flutter-gh-pages@v7
with:
baseHref: /flutter-samples/
workingDir: packages/stream_chat_v1