-
Notifications
You must be signed in to change notification settings - Fork 52
/
config.yml
123 lines (114 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
version: 2.1
workflows:
release:
jobs:
- release:
context: [shared-secrets]
filters:
branches:
only: [main]
release-please:
jobs:
- release-please:
context: [shared-secrets]
filters:
branches:
only: [main]
# Workflow responsible for correctly updating the root lockfile for the release-please PR
# See: https://github.com/googleapis/release-please/issues/1101
release-pull-request:
jobs:
- update-lockfile:
context: [shared-secrets]
filters:
branches:
only: [release-please--branches--main]
'Test & Check 🕵️♀️':
jobs:
- formatting
executors:
node:
docker:
- image: cimg/node:18.19.0
windows:
machine:
image: windows-server-2019-vs2019:stable
resource_class: windows.xlarge
shell: powershell.exe -ExecutionPolicy Bypass
linux:
machine:
image: ubuntu-2004:202201-02
resource_class: large
macos:
resource_class: macos.x86.medium.gen2 # new generation resources
macos:
xcode: 13.0.0
commands:
npm-install-deps:
parameters:
command:
description: The install command that is used
type: string
default: npm ci
steps:
- restore_cache:
keys:
- npm-{{ arch }}-v1-{{ checksum "package-lock.json" }}
- npm-{{ arch }}-v1
- run: curl -fsSL https://deno.land/install.sh | sh -s -- v1.42.3
- run: << parameters.command >>
- save_cache:
key: npm-{{ arch }}-v1-{{ checksum "package-lock.json" }}
paths:
- node_modules
jobs:
release:
description: The release action that runs on the main branch
executor: node
steps:
- checkout
- npm-install-deps
- run: npm run build
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run: npx lerna publish from-package --yes --no-private
- run:
name: Create Github Release
command: |
npx release-please github-release \
--token "${GITHUB_RELEASES_TOKEN}" \
--repo-url "${CIRCLE_REPOSITORY_URL}" \
release-please:
description: Update and creates release PRs on the main branch
executor: node
steps:
- checkout
- run:
name: Run release-please
command: |
npx release-please release-pr \
--token "${GITHUB_RELEASES_TOKEN}" \
--repo-url "${CIRCLE_REPOSITORY_URL}" \
update-lockfile:
description: Update lockfile in a release please PR
executor: node
steps:
- checkout
- run: npm install
- run:
name: Commit and push lockfile
command: |
git remote remove origin
git remote add origin "https://${GITHUB_RELEASES_TOKEN}@github.com/netlify/build.git"
git config user.email "33464286+netlify-jenkins@users.noreply.github.com"
git config user.name "netlify-jenkins"
git add package-lock.json && \
git commit -m "chore: update lockfile" || true && \
git push --set-upstream origin release-please--branches--main
formatting:
description: Checks if the codebase satisfies wit the lint and style rules
executor: node
steps:
- checkout
- npm-install-deps
- run: npm run format:ci
- run: npm run lint:ci