Fix CI
This commit is contained in:
parent
20434ab5e4
commit
a7061a1edf
1 changed files with 12 additions and 66 deletions
|
@ -1,70 +1,16 @@
|
|||
variables:
|
||||
IOS_XCODE_PROJECT_NAME: "easy_learn"
|
||||
FLAVOR: "production"
|
||||
image: cirrusci/flutter:stable
|
||||
|
||||
before_script:
|
||||
- flutter pub get
|
||||
|
||||
stages:
|
||||
- archive
|
||||
- analyze-and-test
|
||||
|
||||
android:debug:
|
||||
stage: archive
|
||||
before_script:
|
||||
- flutter packages get
|
||||
- flutter clean
|
||||
analyze-and-test:
|
||||
stage: analyze-and-test
|
||||
script:
|
||||
- flutter doctor --android-licenses
|
||||
- flutter build apk --flavor ${FLAVOR} --debug
|
||||
artifacts:
|
||||
paths:
|
||||
- "**/**/**/**/**/**/*.apk"
|
||||
expire_in: 1 day
|
||||
|
||||
android:release:
|
||||
stage: archive
|
||||
before_script:
|
||||
- flutter packages get
|
||||
- flutter clean
|
||||
script:
|
||||
- flutter doctor --android-licenses
|
||||
- flutter build apk --flavor ${FLAVOR} --release
|
||||
artifacts:
|
||||
paths:
|
||||
- "**/**/**/**/**/**/*.apk"
|
||||
expire_in: 1 day
|
||||
|
||||
ios:debug:
|
||||
stage: archive
|
||||
before_script:
|
||||
- flutter packages get
|
||||
- flutter clean
|
||||
script:
|
||||
- flutter build ios --flavor ${FLAVOR}
|
||||
- if [ -d archive ]; then rm -rf archive; fi && mkdir archive
|
||||
- if [ -d artifact ]; then rm -rf artifact; fi && mkdir artifact
|
||||
- export PLIST_DIRECTORY="ci-cd/iOS/${FLAVOR}/debug"
|
||||
- cd ios
|
||||
- pod install;
|
||||
- xcodebuild clean archive -quiet -workspace ${IOS_XCODE_PROJECT_NAME}.xcworkspace -scheme ${FLAVOR} -archivePath "../archive/${IOS_XCODE_PROJECT_NAME}.xcarchive";
|
||||
- xcodebuild -quiet -exportArchive -archivePath "../archive/${IOS_XCODE_PROJECT_NAME}.xcarchive" -exportPath ../artifact/ -exportOptionsPlist ${PLIST_DIRECTORY}/*.plist
|
||||
artifacts:
|
||||
paths:
|
||||
- "artifact/*.ipa"
|
||||
expire_in: 1 day
|
||||
|
||||
ios:release:
|
||||
stage: archive
|
||||
before_script:
|
||||
- flutter packages get
|
||||
- flutter clean
|
||||
script:
|
||||
- flutter build ios --flavor ${FLAVOR}
|
||||
- if [ -d archive ]; then rm -rf archive; fi && mkdir archive
|
||||
- if [ -d artifact ]; then rm -rf artifact; fi && mkdir artifact
|
||||
- export PLIST_DIRECTORY="ci-cd/iOS/${FLAVOR}/release"
|
||||
- cd ios
|
||||
- pod install;
|
||||
- xcodebuild clean archive -quiet -workspace ${IOS_XCODE_PROJECT_NAME}.xcworkspace -scheme ${FLAVOR} -archivePath "../archive/${IOS_XCODE_PROJECT_NAME}.xcarchive";
|
||||
- xcodebuild -quiet -exportArchive -archivePath "../archive/${IOS_XCODE_PROJECT_NAME}.xcarchive" -exportPath ../artifact/ -exportOptionsPlist ${PLIST_DIRECTORY}/*.plist
|
||||
artifacts:
|
||||
paths:
|
||||
- "artifact/*.ipa"
|
||||
expire_in: 1 day
|
||||
- flutter build aot
|
||||
- flutter analyze
|
||||
- flutter test
|
||||
only:
|
||||
- merge_requests
|
Loading…
Reference in a new issue