We have the following config .yaml file, which includes a filter for master branch only.
However, this seems to also run on every pull request, even one made to develop and doesn’t include master at all.
File:
version: 2.1
jobs:
test:
docker:
- image: cirrusci/flutter
steps:
- checkout
- run: ./ci/test.sh
- run: flutter doctor
- run: flutter test
publish:
docker:
- image: cirrusci/flutter
working_directory: ~/msh
environment:
GRADLE_OPTS: -Dorg.gradle.daemon=false
steps:
- checkout:
post:
cp android/local.properties.ci android/local.properties
- run:
name: Install fastlane
command: cd android && bundle install
- run:
name: Store the google play key
command: echo $ANDROID_SVC_ACC > ~/secret.json
- run:
name: Init fastlane supply
command: cd android && bundle exec fastlane supply init
- run:
name: create key file
command: ./ci/create_jks.sh
- run:
name: Create bundle
command: flutter build appbundle --release
- run:
name: Publish to store
command: cd android && bundle exec fastlane android deploy
workflows:
version: 2
test_and_publish:
jobs:
- test
- publish:
filters:
branches:
only:
- master