2022-07-19 09:08:45 +00:00
|
|
|
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
|
|
|
|
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
|
|
|
|
#
|
2021-06-28 06:07:45 +00:00
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Swift.gitlab-ci.yml
|
|
|
|
|
2016-09-01 23:20:40 +00:00
|
|
|
# Lifted from: https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
|
2018-09-26 15:59:11 +00:00
|
|
|
# This file assumes an own GitLab CI runner, setup on a macOS system.
|
2016-09-01 23:20:40 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2019-04-05 10:18:10 +00:00
|
|
|
- test
|
2016-09-01 23:20:40 +00:00
|
|
|
- archive
|
2019-04-05 10:18:10 +00:00
|
|
|
- deploy
|
2016-09-01 23:20:40 +00:00
|
|
|
|
|
|
|
build_project:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- xcodebuild clean -project ProjectName.xcodeproj -scheme SchemeName | xcpretty
|
2018-05-09 11:06:41 +00:00
|
|
|
- xcodebuild test -project ProjectName.xcodeproj -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.3' | xcpretty -s
|
2016-09-01 23:20:40 +00:00
|
|
|
tags:
|
2018-05-09 11:06:41 +00:00
|
|
|
- ios_11-3
|
|
|
|
- xcode_9-3
|
|
|
|
- macos_10-13
|
2016-09-01 23:20:40 +00:00
|
|
|
|
|
|
|
archive_project:
|
|
|
|
stage: archive
|
|
|
|
script:
|
|
|
|
- xcodebuild clean archive -archivePath build/ProjectName -scheme SchemeName
|
|
|
|
- xcodebuild -exportArchive -exportFormat ipa -archivePath "build/ProjectName.xcarchive" -exportPath "build/ProjectName.ipa" -exportProvisioningProfile "ProvisioningProfileName"
|
2021-03-12 12:09:33 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
2016-09-01 23:20:40 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-06-05 16:31:35 +00:00
|
|
|
- build/ProjectName.ipa
|
2016-09-01 23:20:40 +00:00
|
|
|
tags:
|
2018-05-09 11:06:41 +00:00
|
|
|
- ios_11-3
|
|
|
|
- xcode_9-3
|
|
|
|
- macos_10-13
|
2022-10-06 21:09:01 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
stage: deploy
|
|
|
|
script: echo "Define your deployment script!"
|
|
|
|
environment: production
|