Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@bbedward @appditto
138 lines (127 sloc) 2.93 KB
before_script:
# Github upload variables
- export GH_OWNER=appditto
- export GH_REPO_NAME=natrium_wallet_flutter
- export GH_API=https://api.github.com
- export GH_REPO=$GH_API/repos/$GH_OWNER/$GH_REPO_NAME
stages:
- test
- update
- build
- tag
- deploy
- postdeploy
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
tag:create:
stage: tag
tags:
- appditto_mac
script:
- ./ci/tag_version.sh
when: manual
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
upload:apk:github_release:
stage: postdeploy
tags:
- appditto_mac
script:
./ci/upload_android_github.sh
needs: ["android:build"]
when: manual
dependencies:
- android:build
You can’t perform that action at this time.