-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
37 lines (35 loc) · 859 Bytes
/
.gitlab-ci.yml
File metadata and controls
37 lines (35 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
stages:
- mirror
- release
mirror:
stage: mirror
script:
- echo "Release to Github"
environment:
name: github
url: https://github.com/AdmitadSDK/ios_sdk
only:
- master
except:
- tags
release:
stage: release
image: ubuntu:latest
before_script:
- apt-get update
- apt-get install -y git ruby > /dev/null
- gem install cocoapods > /dev/null
script:
- set -e
- echo "Release to Cocoapods"
- echo "Tag and version $CI_COMMIT_TAG"
# cocoapods cannot run as root user
- useradd --create-home releaser
- su releaser --command="pod setup --silent > /dev/null"
- su releaser --command="pod spec lint AdmitadSDK.podspec"
- su releaser --command="pod trunk push AdmitadSDK.podspec"
environment:
name: cocoapods
url: https://cocoapods.org/pods/AdmitadSDK
only:
- tags