Skip to content

Commit d188172

Browse files
committed
Add build_nightly workflow
1 parent d18c851 commit d188172

File tree

2 files changed

+117
-14
lines changed

2 files changed

+117
-14
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: build_nightly
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
workflow_dispatch:
8+
9+
defaults:
10+
run:
11+
working-directory: sample_app
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build_and_deploy_ios:
19+
runs-on: macos-latest
20+
timeout-minutes: 40
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
25+
- name: Setup Flutter
26+
uses: subosito/flutter-action@v2
27+
with:
28+
channel: stable
29+
cache: true
30+
31+
- name: Setup Ruby and Gems
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
working-directory: sample_app/ios
35+
bundler-cache: true
36+
37+
- name: Install firebase-tools
38+
run: npm install -g firebase-tools
39+
40+
- name: Copy google service account
41+
run: |
42+
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" > ${{GITHUB_WORKSPACE}}/firebase-service-account.json
43+
44+
- name: Build and release
45+
env:
46+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
47+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
48+
GOOGLE_APPLICATION_CREDENTIALS: ${{GITHUB_WORKSPACE}}/firebase-service-account.json
49+
run: |
50+
flutter build ios --no-codesign
51+
cd ios
52+
bundle exec fastlane deploy_to_firebase
53+
54+
build_and_deploy_android:
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 15
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v3
60+
61+
- name: Setup Java
62+
uses: actions/setup-java@v1
63+
with:
64+
java-version: '12.x'
65+
66+
- name: Setup Flutter
67+
uses: subosito/flutter-action@v2
68+
with:
69+
channel: stable
70+
cache: true
71+
72+
- name: Build
73+
run: flutter build apk
74+
75+
- name: Deploy
76+
uses: wzieba/Firebase-Distribution-Github-Action@v1
77+
with:
78+
appId: ${{secrets.SAMPLE_FIREBASE_ANDROID_APPID}}
79+
serviceCredentialsFileContent: ${{secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS}}
80+
groups: stream-testers
81+
debug: true
82+
file: sample_app/build/app/outputs/apk/release/app-release.apk
83+
84+
- name: Upload APK
85+
uses: actions/upload-artifact@v3
86+
with:
87+
name: android-stream-chat-v1
88+
path: sample_app/build/app/outputs/apk/release/app-release.apk
89+
90+
build_and_deploy_web:
91+
runs-on: ubuntu-latest
92+
timeout-minutes: 10
93+
steps:
94+
- name: Checkout code
95+
uses: actions/checkout@v3
96+
97+
- name: config git
98+
run: |
99+
git config --global user.email "$(git log --format='%ae' HEAD^!)"
100+
git config --global user.name "$(git log --format='%an' HEAD^!)"
101+
git fetch origin gh-pages:gh-pages
102+
103+
- name: Setup Flutter
104+
uses: subosito/flutter-action@v2
105+
with:
106+
channel: stable
107+
cache: true
108+
flutter-version: 3.29.0
109+
110+
- name: Build and Deploy
111+
uses: bluefireteam/flutter-gh-pages@v7
112+
with:
113+
baseHref: /flutter-samples/
114+
workingDir: sample_app
115+
116+

sample_app/ios/fastlane/Matchfile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
git_url("https://github.com/GetStream/ios-certificates")
2-
1+
git_url("[email protected]:GetStream/ios-certificates.git")
32
storage_mode("git")
4-
5-
username("[email protected]")
6-
73
team_id("EHV7XZLAHA")
8-
9-
# app_identifier(["tools.fastlane.app", "tools.fastlane.app2"])
10-
11-
# username("[email protected]") # Your Apple Developer Portal username
12-
13-
# For all available options run `fastlane match --help`
14-
# Remove the # in the beginning of the line to enable the other options
15-
16-
# The docs are available on https://docs.fastlane.tools/actions/match

0 commit comments

Comments
 (0)