Skip to content

Merge branch 'master' of https://github.com/saeedjassani/shiacompanion #91

Merge branch 'master' of https://github.com/saeedjassani/shiacompanion

Merge branch 'master' of https://github.com/saeedjassani/shiacompanion #91

Workflow file for this run

name: Flutter CI
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
# This job will run on ubuntu virtual machine
runs-on: macos-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v2
# Setup Java environment in order to build the Android app.
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
# Cache Flutter SDK to speed up the workflow
- name: Cache Flutter SDK
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-flutter-
# Setup the flutter environment.
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'beta' # 'dev', 'alpha', default to: 'stable'
# flutter-version: '1.12.x' # you can also specify the exact version of Flutter
# Get flutter dependencies.
- name: Get Flutter Dependencies
run: flutter pub get
# Statically analyze the Dart code for any errors.
- name: Static Code Analysis
run: flutter analyze .
# Run widget tests for our flutter project.
- name: Run Widget Tests
run: flutter test
- name: Clear CocoaPods cache and update specs
run: |
cd ios
pod cache clean --all
pod repo update
- name: Check for Changes
id: check-changes
run: |
git diff --exit-code || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
- name: Commit and push changes
if: env.CHANGES_DETECTED == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ios/Podfile.lock
git commit -m "Update Podfile.lock" -a
git push
- name: Build iOS App
run: flutter build ios --release --no-codesign