From e5956053d3b5017f52d3299c473e4e71e8382d83 Mon Sep 17 00:00:00 2001 From: Moe Date: Thu, 26 May 2022 14:00:35 +0700 Subject: [PATCH] Update CI --- .gitlab-ci.yml | 75 +++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ff294e7..fb672bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,20 +7,6 @@ variables: 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: @@ -35,26 +21,6 @@ android:release: - "**/**/**/**/**/**/*.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: @@ -84,20 +50,41 @@ web:release: 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: + extends: + - .shared_windows_runners + stage: archive + before_script: + - choco install visualstudio2019community -y + - choco install vcredist-all -y + - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + - refreshenv + - flutter create . + - flutter packages get + - flutter clean + script: + - flutter build windows --release + +macos:release: + extends: + - .macos_saas_runners + stage: archive + before_script: + - gem install cocoapods + - flutter create . + - cd macos + - pod install + - pod update + - flutter packages get + - flutter clean + script: + - flutter build macos --release + +linux:release: stage: archive before_script: - flutter create . - flutter packages get - flutter clean script: - - flutter build windows --release \ No newline at end of file + - flutter build linux --release \ No newline at end of file