ci: update workflow #16
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: Analysis and checking | |
on: | |
push: | |
branches: | |
- "main" | |
paths-ignore: | |
- "**/README.md" | |
pull_request: | |
branches: | |
- "main" | |
workflow_dispatch: | |
jobs: | |
check: | |
name: π Code analysing and checking | |
runs-on: ubuntu-latest | |
env: | |
JAVA_VERSION: "17" | |
FLUTTER_VERSION: "3.24.3" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: ${{env.JAVA_VERSION}} | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{env.FLUTTER_VERSION}} | |
channel: "stable" | |
- name: π¦ Package install | |
run: flutter pub get | |
- name: Download Google Play Services JSON | |
id: google_services | |
uses: timheuer/base64-to-file@v1.2 | |
with: | |
fileName: "google-services.json" | |
encodedString: ${{ secrets.GOOGLE_SERVICE_BASE64 }} | |
- name: Create google-services.json | |
run: | | |
cp "${{ steps.google_services.outputs.filePath }}" android/app/ | |
- name: Download firebase_options.dart | |
id: firebase_options | |
uses: timheuer/base64-to-file@v1.2 | |
with: | |
fileName: "firebase_options.dart" | |
encodedString: ${{ secrets.FIREBASE_OPTION_DART }} | |
- name: Create firebase_options.dart | |
run: | | |
cp "${{ steps.firebase_options.outputs.filePath }}" lib/ | |
- name: Create .env | |
run: | | |
touch .env | |
echo "ONESIGNAL_APP_ID=${{ secrets.ONESIGNAL_APP_ID }}" >> .env | |
cat .env | |
- name: π¨ Run code generation | |
run: dart run build_runner build | |
- name: π Run easy localization | |
run: dart run easy_localization:generate -S assets/translations -O lib/src/l10n -o locale_keys.g.dart -f keys | |
- name: β Run flutter analyze | |
run: flutter analyze |