Skip to content

Commit 0865ec0

Browse files
committed
fix build run
1 parent d188172 commit 0865ec0

File tree

4 files changed

+60
-19
lines changed

4 files changed

+60
-19
lines changed

.github/workflows/build_nightly.yml

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,31 @@ name: build_nightly
22

33
on:
44
push:
5-
branches:
6-
- develop
5+
# branches:
6+
# - develop
77
workflow_dispatch:
8+
inputs:
9+
build_ios:
10+
type: boolean
11+
description: iOS
12+
default: true
13+
build_android:
14+
type: boolean
15+
description: Android
16+
default: true
17+
build_web:
18+
type: boolean
19+
description: Web
20+
default: true
821

922
defaults:
1023
run:
1124
working-directory: sample_app
1225

26+
env:
27+
FLUTTER_VERSION: "3.29.0"
28+
FLUTTER_CHANNEL: stable
29+
1330
concurrency:
1431
group: ${{ github.workflow }}-${{ github.ref }}
1532
cancel-in-progress: true
@@ -18,14 +35,22 @@ jobs:
1835
build_and_deploy_ios:
1936
runs-on: macos-latest
2037
timeout-minutes: 40
38+
# if: ${{ github.event_name == 'push' || inputs.build_ios == true }}
39+
if: false
2140
steps:
41+
- name: Install Bot SSH Key
42+
uses: webfactory/[email protected]
43+
with:
44+
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
45+
2246
- name: Checkout code
2347
uses: actions/checkout@v3
2448

2549
- name: Setup Flutter
2650
uses: subosito/flutter-action@v2
2751
with:
28-
channel: stable
52+
channel: ${{ env.FLUTTER_CHANNEL }}
53+
flutter-version: ${{ env.FLUTTER_VERSION }}
2954
cache: true
3055

3156
- name: Setup Ruby and Gems
@@ -39,13 +64,12 @@ jobs:
3964

4065
- name: Copy google service account
4166
run: |
42-
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" > ${{GITHUB_WORKSPACE}}/firebase-service-account.json
67+
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ios/firebase-service-account.json
4368
4469
- name: Build and release
4570
env:
71+
GOOGLE_APPLICATION_CREDENTIALS: firebase-service-account.json
4672
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
4973
run: |
5074
flutter build ios --no-codesign
5175
cd ios
@@ -54,42 +78,56 @@ jobs:
5478
build_and_deploy_android:
5579
runs-on: ubuntu-latest
5680
timeout-minutes: 15
81+
if: ${{ github.event_name == 'push' || inputs.build_android == true }}
5782
steps:
83+
- name: Install Bot SSH Key
84+
uses: webfactory/[email protected]
85+
with:
86+
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
87+
5888
- name: Checkout code
5989
uses: actions/checkout@v3
6090

6191
- name: Setup Java
6292
uses: actions/setup-java@v1
6393
with:
64-
java-version: '12.x'
94+
distribution: "zulu"
95+
java-version: "17"
6596

6697
- name: Setup Flutter
6798
uses: subosito/flutter-action@v2
6899
with:
69-
channel: stable
100+
channel: ${{ env.FLUTTER_CHANNEL }}
101+
flutter-version: ${{ env.FLUTTER_VERSION }}
70102
cache: true
71103

72104
- name: Build
73105
run: flutter build apk
74106

107+
- name: Copy google service account
108+
run: |
109+
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/android/firebase-service-account.json
110+
75111
- name: Deploy
76112
uses: wzieba/Firebase-Distribution-Github-Action@v1
77113
with:
78114
appId: ${{secrets.SAMPLE_FIREBASE_ANDROID_APPID}}
79-
serviceCredentialsFileContent: ${{secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS}}
115+
serviceCredentialsFile: "${{ github.workspace }}/sample_app/android/firebase-service-account.json"
80116
groups: stream-testers
81117
debug: true
82-
file: sample_app/build/app/outputs/apk/release/app-release.apk
118+
file: build/app/outputs/apk/release/app-release.apk
83119

84120
- name: Upload APK
85-
uses: actions/upload-artifact@v3
121+
uses: actions/upload-artifact@v4
86122
with:
87123
name: android-stream-chat-v1
88-
path: sample_app/build/app/outputs/apk/release/app-release.apk
124+
path: build/app/outputs/apk/release/app-release.apk
89125

90126
build_and_deploy_web:
91127
runs-on: ubuntu-latest
92128
timeout-minutes: 10
129+
# if: ${{ github.event_name == 'push' || inputs.build_web == true }}
130+
if: false
93131
steps:
94132
- name: Checkout code
95133
uses: actions/checkout@v3
@@ -103,14 +141,14 @@ jobs:
103141
- name: Setup Flutter
104142
uses: subosito/flutter-action@v2
105143
with:
106-
channel: stable
144+
channel: ${{ env.FLUTTER_CHANNEL }}
145+
flutter-version: ${{ env.FLUTTER_VERSION }}
107146
cache: true
108-
flutter-version: 3.29.0
109147

110148
- name: Build and Deploy
111-
uses: bluefireteam/flutter-gh-pages@v7
149+
uses: bluefireteam/flutter-gh-pages@v9
112150
with:
113-
baseHref: /flutter-samples/
151+
baseHref: /stream-chat-flutter/
114152
workingDir: sample_app
115153

116154

sample_app/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ android {
4242
defaultConfig {
4343
applicationId "io.getstream.chat.android.flutter.sample"
4444
minSdkVersion 23
45-
targetSdkVersion 34
45+
targetSdkVersion 35
4646
versionCode flutterVersionCode.toInteger()
4747
versionName flutterVersionName
4848
multiDexEnabled true

sample_app/android/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ subprojects {
1616
def packageName = manifest.@package.text()
1717
android.namespace= packageName
1818
}
19+
if (project.hasProperty('android')) {
20+
project.android { compileSdkVersion 35 }
21+
}
1922
}
2023

2124
}
@@ -25,4 +28,4 @@ subprojects {
2528

2629
tasks.register("clean", Delete) {
2730
delete rootProject.buildDir
28-
}
31+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx2g
22
android.enableR8=true
33
android.useAndroidX=true
44
android.enableJetifier=true

0 commit comments

Comments
 (0)