Added GitHub actions to perform lint actions #223
Workflow file for this run
This file contains 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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
branches: | |
- main | |
- develop | |
paths-ignore: | |
- "**.md" | |
- doc/** | |
- .git/ | |
- .vscode/ | |
- "**.txt" | |
jobs: | |
build_appbundle: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 12.x | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
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: dart fix --apply | |
- name: Flutter Analyze | |
uses: zgosalvez/github-actions-analyze-dart@v2 | |
with: | |
working-directory: packages/hmssdk_flutter | |
- name: Commit Changes | |
run: | | |
git config --global user.name "🤖 100ms Flutter Bot" | |
git config --global user.email "[email protected]" | |
git status | |
git add . | |
git commit -m "🤖 100ms Flutter Bot: Format and Fix" | |
git push --verbose | |
- 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 |