Skip to content

Commit

Permalink
fix: github actions again
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 committed Nov 6, 2024
1 parent 5ee7af4 commit 3607c0a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
37 changes: 22 additions & 15 deletions .github/actions/flutter-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
name: 'Flutter Setup'
description: 'Sets up Flutter environment with Firebase configuration'
inputs:
firebase-options:
description: 'Firebase options for configuration'
firebase-token:
description: 'Firebase token'
required: true
env:
FIREBASE_TOKEN: ${{ inputs.firebase-token }}

runs:
using: "composite"
steps:
- name: Cache Flutter and Dart dependencies
uses: actions/cache@v4
with:
path: |
~/.pub-cache
~/.flutter
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
steps:
- name: Setup Flutter
uses: subosito/flutter-action@v2
uses: flutter-actions/setup-flutter@v3
with:
channel: stable
version: latest
cache: true
cache-sdk: true
cache-key: true

- name: Disable cli animation and analytics
shell: bash
run: |
flutter config --no-cli-animations
flutter config --no-analytics
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup firebase tools
shell: bash
run: sudo npm install -g firebase-tools

- name: Configure firebase options
shell: bash
run: echo "${{ inputs.firebase-options }}" > ./lib/firebase_options.dart
run: |
dart pub global activate flutterfire_cli 1.0.1-dev.4
flutterfire configure -p authentication-699e4 --android-package-name=com.codeTrenchers.evBookingOperators --platforms="android" --yes
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Flutter Environment
uses: ./.github/actions/flutter-setup
with:
firebase-options: ${{ secrets.FIREBASE_OPTIONS }}
firebase-token: ${{ secrets.FIREBASE_TOKEN }}

- name: Dart Format Check
run: dart format --output=none $(find . -name "*.dart" ! -path "./lib/firebase_options.dart") --set-exit-if-changed
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
/android/app/build
/android/app/build
.fvm/

0 comments on commit 3607c0a

Please sign in to comment.