-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.yml
95 lines (87 loc) · 2.12 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
version: 2.1
orbs:
node: circleci/node@5.1.0
vault: contentful/vault@1
commands:
setup-npm:
steps:
- vault/get-secrets:
template-preset: "packages-read"
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
jobs:
lint-and-test:
docker:
- image: "cimg/base:current"
parameters:
node-version:
type: string
steps:
- checkout
- node/install:
node-version: << parameters.node-version >>
- setup-npm
- run: npm ci
- run:
name: Run linter
command: npm run lint
- run:
name: Run tests
command: npm run test
build:
docker:
- image: "cimg/base:current"
steps:
- checkout
- node/install:
node-version: "18"
- setup-npm
- run: npm ci
- run: npm run build
- run: npm run build:docs
lint-commits:
docker:
- image: "cimg/base:current"
steps:
- checkout
- node/install:
node-version: "18"
- setup-npm
- run: npm ci
semantic-release:
docker:
- image: "cimg/base:current"
steps:
- checkout
- vault/get-secrets:
template-preset: "semantic-release-ecosystem"
- run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc
- run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc
- node/install:
node-version: "20.8.1"
- run: npm ci
- run:
name: Releasing
command: npm run semantic-release
workflows:
lint-build-release:
jobs:
- lint-and-test:
context:
- vault
matrix:
parameters:
node-version: ["18.12.0", "20.6.1"]
- lint-commits:
context:
- vault
- build:
context:
- vault
- semantic-release:
context:
- vault
requires:
- lint-and-test
- lint-commits
- build