build(deps): bump project dependencies, remove webview #119
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
# For more information see: https://github.com/marketplace/actions/flutter-action | |
name: validate-pr | |
on: | |
pull_request: | |
branches: [main] | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.head_ref }}.${{ github.sha }}.validate-pr | |
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 | |
premerge: | |
needs: checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Detect changes | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
src: | |
- '.github/workflows/validate-pr.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: Validate the commit messages | |
run: | | |
sudo pip3 install -U Commitizen | |
git checkout -b premerge | |
git fetch origin main:main | |
cz check --rev-range main..premerge | |
- 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 app bundle | |
if: ${{ steps.changes.outputs.src == 'true' && needs.checks.outputs.origin == 'true' }} | |
run: flutter build appbundle | |
- name: Cleanup | |
if: always() | |
uses: ./.github/actions/cleanup-environment |