Skip to content

Instantly share code, notes, and snippets.

@bbedward
Last active November 14, 2019 16:10
Show Gist options
  • Save bbedward/a0fb271da243c408ae864bf3b1891610 to your computer and use it in GitHub Desktop.
Save bbedward/a0fb271da243c408ae864bf3b1891610 to your computer and use it in GitHub Desktop.
stages:
- test
- update
- build
- deploy
tests:
stage: test
only:
- master
tags:
- appditto_mac
script:
- flutter test
interruptible: true
update:
stage: update
only:
- master
tags:
- appditto_mac
script:
- flutter packages get
- flutter packages upgrade
interruptible: true
android:build:
stage: build
tags:
- appditto_mac
script:
# Flutter local configuration
- echo flutter.sdk=$FLUTTER_PATH > android/local.properties
- echo sdk.dir=$ANDROID_SDK_PATH >> android/local.properties
- echo flutter.buildMode=release >> android/local.properties
# Android signing
- echo storePassword=$ANDROID_KEY_STORE_PASSWORD > android/key.properties
- echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
- echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
- echo storeFile=$ANDROID_KEYSTORE_PATH >> android/key.properties
- cd android
- bundle exec fastlane build_android production:true
- rm -f android/local.properties
- rm -f android/key.properties
artifacts:
paths:
- build/app/outputs/apk/release/app-release.apk
- build/app/outputs/bundle/release/app.aab
expire_in: 1 week
interruptible: true
ios:build:
stage: build
tags:
- appditto_mac
script:
- cd ios
- export TEMP_KEYCHAIN_NAME=fastlane_$(cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w ${1:-16} | head -n 1)
- export TEMP_KEYCHAIN_PASSWORD=$(cat /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w ${1:-64} | head -n 1)
- bundle exec fastlane build_ios
artifacts:
paths:
- ios/Runner.ipa
expire_in: 1 week
interruptible: true
prod:android:deploy:
stage: deploy
tags:
- appditto_mac
script:
- cd android
- bundle exec fastlane deploy_android production:true
when: manual
dependencies:
- android:build
prod:ios:deploy:
stage: deploy
tags:
- appditto_mac
script:
- cd ios
- bundle exec fastlane deploy_ios
when: manual
dependencies:
- ios:build
z:internal:android:deploy:
stage: deploy
tags:
- appditto_mac
script:
- cd android
- bundle exec fastlane deploy_android internal:true
when: manual
dependencies:
- android:build
z:tflight:ios:deploy:
stage: deploy
tags:
- appditto_mac
script:
- cd ios
- bundle exec fastlane deploy_ios testflight:true
when: manual
dependencies:
- android:build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment