forked from tophat/RichTextView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
138 lines (131 loc) · 3.42 KB
/
config.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: 2.1
website_docker_defaults: &website_docker_defaults
working_directory: ~/repo/website
docker:
- image: circleci/node:8.11.3
mac_defaults: &mac_defaults
working_directory: ~/repo
macos:
xcode: "10.2.0"
commands:
prep_mac_env:
steps:
- checkout:
path: ~/repo
- restore_cache:
name: Restores cocoapods Cache
key: richtextview-v3-{{ checksum "Podfile.lock" }}
save_cocoapods_cache:
steps:
- save_cache:
name: Saves cocoapods cache
key: richtextview-v3-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
- ~/.cocoapods
prep_website_env:
description: Prepapres environment with cache
steps:
- checkout:
path: ~/repo
- restore_cache:
name: Restore node_modules cache
key: website-{{ .Branch }}-{{ checksum "yarn.lock" }}
save_website_cache:
description: Saves environment cache
steps:
- save_cache:
name: Save node_modules cache
key: website-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
jobs:
build:
<<: *mac_defaults
steps:
- prep_mac_env
- run:
name: Install CocoaPods
command: |
sudo gem install cocoapods
pod install
- save_cocoapods_cache
- run:
name: Build and run RichTextView Tests
command: fastlane scan
environment:
SCAN_DEVICE: iPhone 6
SCAN_SCHEME: RichTextView
- store_test_results:
path: test_output/report.xml
- store_artifacts:
path: /tmp/test-results
destination: scan-test-results
- store_artifacts:
path: ~/Library/Logs/scan
destination: scan-logs
- run:
name: Execute Danger
command: bundle install && bundle exec danger --verbose
deploy:
<<: *mac_defaults
steps:
- prep_mac_env
- run:
name: Deploy
command: pod trunk push RichTextView.podspec --allow-warnings
website:
<<: *website_docker_defaults
steps:
- prep_website_env
- run: yarn install
- save_website_cache
- run: yarn build
- persist_to_workspace:
root: ./
paths:
- build/
deploy_website:
<<: *website_docker_defaults
steps:
- prep_website_env
- attach_workspace:
at: ./
- add_ssh_keys:
fingerprints:
- "ea:64:9c:ee:8a:f7:7d:a2:f7:7d:39:e7:92:7a:54:6f"
- run:
name: Setup git user and deploy website
command: |
git config --global user.email "[email protected]"
git config --global user.name "CircleCI RichTextView"
CUSTOM_COMMIT_MESSAGE="[skip ci]" USE_SSH=true yarn publish-gh-pages
workflows:
version: 2
richtextview_and_website:
jobs:
- build:
filters:
tags:
only: /^[0-9]+.[0-9]+.[0-9]+$/
- deploy:
requires:
- build
filters:
tags:
only: /^[0-9]+.[0-9]+.[0-9]+$/
branches:
ignore: /.*/
- website
- deploy_website:
requires:
- website
filters:
branches:
only:
- master
experimental:
notify:
branches:
only:
- master