-
Notifications
You must be signed in to change notification settings - Fork 105
/
config.yml
94 lines (85 loc) 路 2.22 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
version: 2.1
orbs:
frontend-tools: contentful/frontend-tools@1
vault: contentful/vault@1
executors:
default:
docker:
- image: cypress/browsers:node16.13.2-chrome100-ff98
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
cache-key: &cache-key
key: npm-cache-{{ arch }}-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}-{{ .Branch }}
commands:
use_npm_token:
steps:
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
yarn_install:
steps:
- restore_cache: *cache-key
- run: node -v
- run: yarn -v
- run: yarn install --prefer-offline --pure-lockfile
- save_cache:
<<: *cache-key
paths:
- ~/.cache/yarn
jobs:
lint-and-test:
executor: default
steps:
- checkout
- vault/get-secrets:
template-preset: npm-read
- yarn_install
- run: yarn build
- run: yarn lint
- run: yarn prettier:check
- run: yarn test
resource_class: medium+
release:
executor: default
steps:
- checkout
- vault/get-secrets:
template-preset: semantic-release-ecosystem
- run: git config --global user.email $GIT_COMMITTER_EMAIL
- run: git config --global user.name $GIT_COMMITTER_NAME
- run: git remote set-url origin "https://$GIT_AUTHOR_NAME:$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
- use_npm_token
- yarn_install
- run: yarn build
- run: yarn lerna:version
- run: yarn lerna publish from-git --yes
compressed-size:
executor: default
steps:
- checkout
- vault/get-secrets:
template-preset: npm-read
- vault/get-secrets:
template-preset: github-comment
- use_npm_token
- frontend-tools/compressed-size
workflows:
version: 2
# run on every commit
commit:
jobs:
- lint-and-test:
context:
- vault
- release:
context:
- vault
filters:
branches:
only: master
requires:
- lint-and-test
compressed-size:
jobs:
- compressed-size:
context:
- vault