-
Notifications
You must be signed in to change notification settings - Fork 15
executable file
·323 lines (321 loc) · 14.4 KB
/
release.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
name: Release CLI Plugins
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: pnpm/action-setup@v4
with:
version: 7
- uses: actions/setup-node@v1
with:
node-version: '18.x'
cache: 'pnpm'
- name: Reading Configuration
id: release_config
uses: rgarcia-phi/[email protected]
with:
filename: .github/config/release.json
prefix: release
- name: Installing dependencies of dev dependencies
id: dev-dependencies-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_dev-dependencies == 'true'}}
working-directory: ./packages/contentstack-dev-dependencies
run: npm install
- name: Compiling dev dependencies
if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-dev-dependencies
run: npm run prepack
- name: Publishing dev dependencies
uses: JS-DevTools/[email protected]
if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-dev-dependencies/package.json
- name: Installing dependencies of utilities
id: utilities-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}}
working-directory: ./packages/contentstack-utilities
run: npm install
- name: Compiling utilities
if: ${{ steps.utilities-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-utilities
run: npm run prepack
- name: Publishing utilities
uses: JS-DevTools/[email protected]
if: ${{ steps.utilities-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-utilities/package.json
- name: Installing dependencies of variants
id: variants-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}}
working-directory: ./packages/contentstack-variants
run: npm install
- name: Compiling variants
if: ${{ steps.variants-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-variants
run: npm run prepack
- name: Publishing variants
uses: JS-DevTools/[email protected]
if: ${{ steps.variants-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-variants/package.json
access: public
- name: Installing dependencies of command
id: command-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_command == 'true'}}
working-directory: ./packages/contentstack-command
run: npm install
- name: Compiling command
if: ${{ steps.command-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-command
run: npm run prepack
- name: Publishing command
uses: JS-DevTools/[email protected]
if: ${{ steps.command-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-command/package.json
- name: Installing dependencies of config
id: config-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_config == 'true'}}
working-directory: ./packages/contentstack-config
run: npm install
- name: Compiling config
if: ${{ steps.config-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-config
run: npm run prepack
- name: Publishing config
uses: JS-DevTools/[email protected]
if: ${{ steps.config-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-config/package.json
- name: Installing dependencies of auth
id: auth-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_auth == 'true'}}
working-directory: ./packages/contentstack-auth
run: npm install
- name: Compiling auth
if: ${{ steps.auth-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-auth
run: npm run prepack
- name: Publishing auth
uses: JS-DevTools/[email protected]
if: ${{ steps.auth-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-auth/package.json
- name: Installing dependencies of export
id: export-installation
if: ${{ env.release_releaseAll == 'true' || env.release_plugins_export == 'true'}}
working-directory: ./packages/contentstack-export
run: npm install
- name: Compiling export
if: ${{ steps.export-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-export
run: npm run prepack
- name: Publishing export
uses: JS-DevTools/[email protected]
if: ${{ steps.export-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-export/package.json
- name: Installing dependencies of audit
id: audit-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_audit == 'true'}}
working-directory: ./packages/contentstack-audit
run: npm install
- name: Compiling audit
if: ${{ steps.audit-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-audit
run: npm run prepack
- name: Publishing audit
uses: JS-DevTools/[email protected]
if: ${{ steps.audit-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-audit/package.json
access: public
- name: Installing dependencies of import
id: import-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import == 'true'}}
working-directory: ./packages/contentstack-import
run: npm install
- name: Compiling import
if: ${{ steps.import-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-import
run: npm run prepack
- name: Publishing import
uses: JS-DevTools/[email protected]
if: ${{ steps.import-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-import/package.json
- name: Installing dependencies of clone
id: clone-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_clone == 'true'}}
working-directory: ./packages/contentstack-clone
run: npm install
- name: Publishing clone
uses: JS-DevTools/[email protected]
if: ${{ steps.clone-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-clone/package.json
- name: Installing dependencies of import-setup
id: import-setup-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import_setup == 'true'}}
working-directory: ./packages/contentstack-import-setup
run: npm install
- name: Compiling import-setup
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-import-setup
run: npm run prepack
- name: Publishing import-setup
uses: JS-DevTools/[email protected]
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-import-setup/package.json
access: public
tag: beta
- name: Installing dependencies of export to csv
id: export-to-csv-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}}
working-directory: ./packages/contentstack-export-to-csv
run: npm install
- name: Publishing export to csv
uses: JS-DevTools/[email protected]
if: ${{ steps.export-to-csv-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-export-to-csv/package.json
- name: Installing dependencies of migrate rte
id: migrate-rte-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_migrate-rte == 'true'}}
working-directory: ./packages/contentstack-migrate-rte
run: npm install
- name: Publishing migrate rte
uses: JS-DevTools/[email protected]
if: ${{ steps.migrate-rte-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-migrate-rte/package.json
- name: Installing dependencies of migration
id: migration-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_migration == 'true'}}
working-directory: ./packages/contentstack-migration
run: npm install
- name: Publishing migration
uses: JS-DevTools/[email protected]
if: ${{ steps.migration-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-migration/package.json
- name: Installing dependencies of seed
id: seed-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_seed == 'true'}}
working-directory: ./packages/contentstack-seed
run: npm install
- name: Compiling seed
if: ${{ steps.seed-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-seed
run: npm run prepack
- name: Publishing seed
uses: JS-DevTools/[email protected]
if: ${{ steps.seed-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-seed/package.json
- name: Installing dependencies of bootstrap
id: bootstrap-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_bootstrap == 'true'}}
working-directory: ./packages/contentstack-bootstrap
run: npm install
- name: Compiling bootstrap
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-bootstrap
run: npm run prepack
- name: Publishing bootstrap
uses: JS-DevTools/[email protected]
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-bootstrap/package.json
- name: Installing dependencies of bulk publish
id: bulk-publish-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_bulk-publish == 'true'}}
working-directory: ./packages/contentstack-bulk-publish
run: npm install
- name: Publishing bulk publish
uses: JS-DevTools/[email protected]
if: ${{ steps.bulk-publish-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-bulk-publish/package.json
- name: Installing dependencies of launch
id: launch-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_launch == 'true'}}
working-directory: ./packages/contentstack-launch
run: npm install
- name: Compiling launch
if: ${{ steps.launch-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-launch
run: npm run prepack
- name: Publishing launch
uses: JS-DevTools/[email protected]
if: ${{ steps.launch-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-launch/package.json
access: public
- name: Installing dependencies of branches
id: branches-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_branches == 'true'}}
working-directory: ./packages/contentstack-branches
run: npm install
- name: Compiling branches
if: ${{ steps.branches-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack-branches
run: npm run prepack
- name: Publishing branches
uses: JS-DevTools/[email protected]
if: ${{ steps.branches-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-branches/package.json
access: public
- name: Installing dependencies of core
id: core-installation
if: ${{env.release_releaseAll == 'true' || env.release_plugins_core == 'true'}}
working-directory: ./packages/contentstack
run: npm install
- name: Compiling core
if: ${{ steps.core-installation.conclusion == 'success' }}
working-directory: ./packages/contentstack
run: npm run prepack
- name: Publishing core
id: publish-core
uses: JS-DevTools/[email protected]
if: ${{ steps.core-installation.conclusion == 'success' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack/package.json
- uses: actions/[email protected]
with:
ref: 'prod-qa-pipeline'
- run: echo ${{ steps.publish-core.outputs.version }} > version.md
- uses: EndBug/add-and-commit@v9
with:
message: 'Released version'
- name: Create Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create v${{ steps.publish-core.outputs.version }} --title "Release ${{ steps.publish-core.outputs.version }}" --generate-notes