-
Notifications
You must be signed in to change notification settings - Fork 30
/
config.yml
116 lines (110 loc) · 2.87 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
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
aliases:
- &install_yarn_version
name: Install specific Yarn version
command: |
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.16.0
echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV
- &restore_yarn_cache
name: Restore Yarn cache
keys:
- yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}
- &save_yarn_cache
name: Save Yarn cache
key: yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- &run_yarn_install
name: Install dependencies
command: yarn install
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:12.18.0
version: 2
jobs:
test:
<<: *defaults
steps:
- checkout
- run: *install_yarn_version
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run:
name: Lint
command: yarn lint
- run:
name: Unit Tests
command: yarn test:ci
prepare_release:
<<: *defaults
steps:
- checkout
- run: *install_yarn_version
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run:
name: Prepare release
command: |
git config --global user.email "karis612@gmail.com"
git config --global user.name "Eunjae Lee"
yarn run release --yes --no-browse
shipjs_trigger:
<<: *defaults
steps:
- checkout
- run: *install_yarn_version
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run:
name: Triggering Ship.js to Release
command: yarn shipjs trigger
gh_pages:
<<: *defaults
steps:
- checkout
- run: *install_yarn_version
- restore_cache: *restore_yarn_cache
- run: *run_yarn_install
- save_cache: *save_yarn_cache
- run:
name: Release website to gh-pages
command: |
git config --global user.email "karis612@gmail.com"
git config --global user.name "Eunjae Lee"
yarn workspace website deploy:gh
workflows:
version: 2
ci:
jobs:
- test
- shipjs_trigger:
requires:
- test
filters:
branches:
only:
- main
gh_pages:
jobs:
- gh_pages:
filters:
branches:
only:
- main
prepare_release_every_tuesday:
triggers:
- schedule:
cron: "0 9 * * 2"
filters:
branches:
only:
- main
jobs:
- prepare_release