Skip to content

build(deps): bump project dependencies, remove webview (#140) #22

build(deps): bump project dependencies, remove webview (#140)

build(deps): bump project dependencies, remove webview (#140) #22

Workflow file for this run

# For more information see: https://github.com/marketplace/actions/flutter-action
name: trunk
on:
push:
branches: [main]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.head_ref }}.${{ github.sha }}.trunk
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
outputs:
origin: ${{ steps.check-origin.outputs.origin }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check origin
id: check-origin
uses: ./.github/actions/check-origin
trunk:
needs: checks
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Detect changes
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- '.github/workflows/trunk.yml'
- 'lib/**'
- 'test/**'
- 'android/**'
- 'ios/**'
- 'analysis_options.yaml'
- '.metadata'
- 'pubspec.yaml'
- 'pubspec.lock'
- name: Setup environment
if: ${{ steps.changes.outputs.src == 'true' }}
uses: ./.github/actions/setup-environment
with:
src: ${{ steps.changes.outputs.src }}
- name: Create .env
if: ${{ steps.changes.outputs.src == 'true' && needs.checks.outputs.origin == 'true' }}
shell: bash
run: |
echo "SENTRY_DSN='$SENTRY_DSN'" > ./.env
echo "FIRE_API_KEY='$FIRE_API_KEY'" >> ./.env
echo "FIRE_APP_ID='$FIRE_APP_ID'" >> ./.env
echo "FIRE_MESSAGING_SENDER_ID='$FIRE_MESSAGING_SENDER_ID'" >> ./.env
echo "FIRE_PROJECT_ID='$FIRE_PROJECT_ID'" >> ./.env
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
FIRE_API_KEY: ${{ secrets.FIRE_API_KEY }}
FIRE_APP_ID: ${{ secrets.FIRE_APP_ID }}
FIRE_MESSAGING_SENDER_ID: ${{ secrets.FIRE_MESSAGING_SENDER_ID }}
FIRE_PROJECT_ID: ${{ secrets.FIRE_PROJECT_ID }}
- name: Analyze
if: ${{ steps.changes.outputs.src == 'true' }}
run: flutter analyze
- name: Run tests
if: ${{ steps.changes.outputs.src == 'true' }}
run: flutter test
- name: Create google-services.json
if: ${{ steps.changes.outputs.src == 'true' && needs.checks.outputs.origin == 'true' }}
run: jq -n "$GOOGLE_SERVICES_JSON" > ./android/app/google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
- name: Build APK
if: ${{ steps.changes.outputs.src == 'true' && needs.checks.outputs.origin == 'true' }}
run: flutter build apk
- name: Cleanup
if: always()
uses: ./.github/actions/cleanup-environment