app/.gitlab-ci.yml
2022-05-26 13:50:52 +07:00

103 lines
No EOL
2.7 KiB
YAML

image: cirrusci/flutter:stable
variables:
IOS_XCODE_PROJECT_NAME: "nekoya"
FLAVOR: "production"
stages:
- archive
android:debug:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter doctor --android-licenses
- flutter build apk --debug
artifacts:
paths:
- "**/**/**/**/**/**/*.apk"
expire_in: 1 day
android:release:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter doctor --android-licenses
- flutter build apk --release
artifacts:
paths:
- "**/**/**/**/**/**/*.apk"
expire_in: 1 day
ios:debug:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter build ipa
- 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 create .
- flutter packages get
- flutter clean
script:
- flutter build ipa
- 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
web:release:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter build web --release
windows:debug:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter build windows --debug
windows:release:
stage: archive
before_script:
- flutter create .
- flutter packages get
- flutter clean
script:
- flutter build windows --release