-
Notifications
You must be signed in to change notification settings - Fork 75
69 lines (65 loc) · 1.81 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch: {}
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
- develop
paths-ignore:
- "**.md"
- doc/**
- .git/
- .vscode/
- "**.txt"
jobs:
check_build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17.x
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.13.9
cache: true
- name: Get Flutter dependencies in Core SDK
run: flutter pub get
working-directory: packages/hmssdk_flutter
- name: Dart Format
run: dart format .
- name: Dart Fix
run: cd packages/hmssdk_flutter; dart fix --apply
- name: Flutter Analyze in HMSSDK
uses: invertase/github-action-dart-analyzer@v1
with:
working-directory: packages/hmssdk_flutter
- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 🤖 Automated Format and Fix
commit_user_name: 🤖 100ms Flutter Bot
- name: Build Android App Bundle
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
run: |
echo $FIREBASE_CONFIG > packages/hmssdk_flutter/example/android/app/google-services.json
cd packages/hmssdk_flutter/example
flutter build appbundle --debug -t lib/main.dart
shell: bash