Last active
August 15, 2019 12:29
-
-
Save masashi-sutou/2d2cf584214f5b8d740d0dcc3cdd27c5 to your computer and use it in GitHub Desktop.
~/.circleci/config.yml ref:Qiita記事「CircleCI 2.1 と fastlane で Flutter の iOS と Android をビルドして DeployGate で配布する」
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
version: 2.1 | |
executors: | |
default_android: | |
shell: /bin/bash --login -eo pipefail | |
environment: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
working_directory: ~/flutterApp | |
docker: | |
- image: cirrusci/flutter:latest | |
default_ios: | |
shell: /bin/bash --login -eo pipefail | |
environment: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
working_directory: ~/flutterApp | |
macos: | |
# https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions | |
xcode: "10.1.0" | |
commands: | |
install_flutter: | |
steps: | |
- run: | |
name: Install flutter SDK | |
command: mkdir -p ~/sdks/flutter && git clone -b stable https://github.com/flutter/flutter.git ~/sdks/flutter | |
- run: | |
name: Set flutter SDK PATH in bash | |
command: echo 'export FLUTTER_HOME=~/sdks/flutter' >> $BASH_ENV && source $BASH_ENV | |
setup_flutter: | |
steps: | |
- run: | |
name: Run flutter doctor | |
command: $FLUTTER_HOME/bin/flutter doctor | |
- run: | |
name: Run flutter analyze | |
command: $FLUTTER_HOME/bin/flutter analyze | |
setup_bundle: | |
parameters: | |
platform: | |
type: enum | |
enum: ['android', 'ios'] | |
steps: | |
- run: | |
name: Set ruby version | |
command: echo "ruby-2.4" > ~/.ruby-version | |
- run: | |
name: Run bundle install | |
command: bundle install --path vendor/bundle | |
working_directory: ~/flutterApp/<< parameters.platform >> | |
environment: | |
BUNDLE_JOBS: 4 | |
BUNDLE_RETRY: 3 | |
setup_ios_build_setting: | |
steps: | |
- run: | |
name: Run pod setup | |
command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf | |
working_directory: ~/flutterApp/ios | |
flutter_build: | |
parameters: | |
platform: | |
type: enum | |
enum: ['android', 'ios'] | |
configuration: | |
type: enum | |
enum: ['development', 'staging', 'production'] | |
steps: | |
- run: | |
name: Run build << parameters.platform >> app in << parameters.configuration >> | |
command: bundle exec fastlane << parameters.platform >> << parameters.configuration >> | |
working_directory: ~/flutterApp/<< parameters.platform >> | |
jobs: | |
beta_development_android: | |
executor: | |
name: default_android | |
steps: | |
- checkout | |
- setup_flutter | |
- setup_bundle: | |
platform: android | |
- flutter_build: | |
platform: android | |
configuration: development | |
beta_development_ios: | |
executor: | |
name: default_ios | |
steps: | |
- checkout | |
- install_flutter | |
- setup_flutter | |
- setup_bundle: | |
platform: ios | |
- setup_ios_build_setting | |
- flutter_build: | |
platform: ios | |
configuration: development | |
workflows: | |
build-debug: | |
jobs: | |
- beta_development_android: | |
filters: | |
branches: | |
only: | |
- /dev_.*/ | |
- beta_development_ios: | |
filters: | |
branches: | |
only: | |
- /dev_.*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment