-
-
Notifications
You must be signed in to change notification settings - Fork 120
578 lines (488 loc) · 20.5 KB
/
npm.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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
name: Create Release & Push Package
on:
push:
tags:
- v4*
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm run coverage
- run: npm run b:website
- run: npm run b:doc
- run: cp -rp LICENSE packages/uiw
- continue-on-error: true
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
COMMIT=released-${VERSION}
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo "version: $VERSION"
export VERSION
node node_modules/.bin/lerna version $VERSION --no-changelog --no-git-tag-version --no-push --yes --force-publish
npm run b:website
npm run b:doc
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -am $COMMIT
- run: rm -rf packages/doc/web
- run: mkdir -p packages/doc/web
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|actions-user|renovate-bot|dependabot\[bot\])
output: ./website/build/CONTRIBUTORS.svg
avatarSize: 42
- run: cp -rf website/build/* packages/doc/web
- run: npm run bundle
- run: cp -rp packages/uiw/dist/*js website/build
- run: cp -rp packages/uiw/dist/*css website/build
- run: git checkout -f packages/uiw/tsconfig.json
- run: git status
- name: git push master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@main
- name: Deploy to uiwjs.github.io
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: '[${{steps.tag_version.outputs.tag}}] ${{ github.event.head_commit.message }}'
personal_token: ${{ secrets.PERSONAL_TOKEN_UIW }}
publish_dir: ./website/build
publish_branch: master
external_repository: uiwjs/uiwjs.github.io
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: '[${{steps.tag_version.outputs.tag}}] ${{ github.event.head_commit.message }}'
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./website/build
cname: uiw.js.cool
- name: Generate changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
filter-author: (小弟调调™)
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
- run: |
echo "tag: ${{ steps.changelog.outputs.tag }}"
echo "version: ${{ steps.changelog.outputs.version }}"
echo "ref: ${{ github.ref }}"
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.changelog.outputs.tag }}
tag: ${{ steps.changelog.outputs.tag }}
body: |
[![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/uiw@${{steps.changelog.outputs.version}}/file/README.md) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/uiw)](https://bundlephobia.com/result?p=uiw@${{steps.changelog.outputs.version}}) [![npm version](https://img.shields.io/npm/v/uiw.svg)](https://www.npmjs.com/package/uiw)
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/uiw/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
```bash
npm i uiw@${{steps.changelog.outputs.version}}
```
${{ steps.changelog.outputs.changelog }}
- name: Sync to Gitee
continue-on-error: true
run: |
mirror() {
git clone "https://github.com/$1/$2"
cd "$2"
git remote add gitee "https://jaywcjlove:${{ secrets.GITEE_TOKEN }}@gitee.com/uiw/$2.git"
git remote set-head origin -d
git push gitee --prune +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
cd ..
}
mirror uiwjs uiw
- name: 📦 @uiw/react-affix publish to NPM
continue-on-error: true
working-directory: ./packages/react-affix/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-alert publish to NPM
continue-on-error: true
working-directory: ./packages/react-alert/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-auto-link publish to NPM
continue-on-error: true
working-directory: ./packages/react-auto-link/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-avatar publish to NPM
continue-on-error: true
working-directory: ./packages/react-avatar/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-back-top publish to NPM
continue-on-error: true
working-directory: ./packages/react-back-top/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-badge publish to NPM
continue-on-error: true
working-directory: ./packages/react-badge/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-breadcrumb publish to NPM
continue-on-error: true
working-directory: ./packages/react-breadcrumb/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-button publish to NPM
continue-on-error: true
working-directory: ./packages/react-button/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-button-group publish to NPM
continue-on-error: true
working-directory: ./packages/react-button-group/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-calendar publish to NPM
continue-on-error: true
working-directory: ./packages/react-calendar/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-card publish to NPM
continue-on-error: true
working-directory: ./packages/react-card/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-carousel publish to NPM
continue-on-error: true
working-directory: ./packages/react-carousel/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-cascader publish to NPM
continue-on-error: true
working-directory: ./packages/react-cascader/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-checkbox publish to NPM
continue-on-error: true
working-directory: ./packages/react-checkbox/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-collapse publish to NPM
continue-on-error: true
working-directory: ./packages/react-collapse/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-copy-to-clipboard publish to NPM
continue-on-error: true
working-directory: ./packages/react-copy-to-clipboard/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-date-input publish to NPM
continue-on-error: true
working-directory: ./packages/react-date-input/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-date-picker publish to NPM
continue-on-error: true
working-directory: ./packages/react-date-picker/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-descriptions publish to NPM
continue-on-error: true
working-directory: ./packages/react-descriptions/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-divider publish to NPM
continue-on-error: true
working-directory: ./packages/react-divider/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-drawer publish to NPM
continue-on-error: true
working-directory: ./packages/react-drawer/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-dropdown publish to NPM
continue-on-error: true
working-directory: ./packages/react-dropdown/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-empty publish to NPM
continue-on-error: true
working-directory: ./packages/react-empty/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-file-input publish to NPM
continue-on-error: true
working-directory: ./packages/react-file-input/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-form publish to NPM
continue-on-error: true
working-directory: ./packages/react-form/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-grid publish to NPM
continue-on-error: true
working-directory: ./packages/react-grid/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-icon publish to NPM
continue-on-error: true
working-directory: ./packages/react-icon/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-input publish to NPM
continue-on-error: true
working-directory: ./packages/react-input/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-list publish to NPM
continue-on-error: true
working-directory: ./packages/react-list/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-loader publish to NPM
continue-on-error: true
working-directory: ./packages/react-loader/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-menu publish to NPM
continue-on-error: true
working-directory: ./packages/react-menu/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-message publish to NPM
continue-on-error: true
working-directory: ./packages/react-message/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-modal publish to NPM
continue-on-error: true
working-directory: ./packages/react-modal/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-month-picker publish to NPM
continue-on-error: true
working-directory: ./packages/react-month-picker/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-notify publish to NPM
continue-on-error: true
working-directory: ./packages/react-notify/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-overlay publish to NPM
continue-on-error: true
working-directory: ./packages/react-overlay/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-overlay-trigger publish to NPM
continue-on-error: true
working-directory: ./packages/react-overlay-trigger/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-pagination publish to NPM
continue-on-error: true
working-directory: ./packages/react-pagination/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-pin-code publish to NPM
continue-on-error: true
working-directory: ./packages/react-pin-code/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-popover publish to NPM
continue-on-error: true
working-directory: ./packages/react-popover/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-portal publish to NPM
continue-on-error: true
working-directory: ./packages/react-portal/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-progress publish to NPM
continue-on-error: true
working-directory: ./packages/react-progress/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-radio publish to NPM
continue-on-error: true
working-directory: ./packages/react-radio/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-rate publish to NPM
continue-on-error: true
working-directory: ./packages/react-rate/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-search-select publish to NPM
continue-on-error: true
working-directory: ./packages/react-search-select/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-search-tree publish to NPM
continue-on-error: true
working-directory: ./packages/react-search-tree/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-select publish to NPM
continue-on-error: true
working-directory: ./packages/react-select/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-slider publish to NPM
continue-on-error: true
working-directory: ./packages/react-slider/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-steps publish to NPM
continue-on-error: true
working-directory: ./packages/react-steps/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-switch publish to NPM
continue-on-error: true
working-directory: ./packages/react-switch/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-table publish to NPM
continue-on-error: true
working-directory: ./packages/react-table/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-tabs publish to NPM
continue-on-error: true
working-directory: ./packages/react-tabs/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-tag publish to NPM
continue-on-error: true
working-directory: ./packages/react-tag/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-textarea publish to NPM
continue-on-error: true
working-directory: ./packages/react-textarea/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-time-picker publish to NPM
continue-on-error: true
working-directory: ./packages/react-time-picker/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-tooltip publish to NPM
continue-on-error: true
working-directory: ./packages/react-tooltip/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-tree publish to NPM
continue-on-error: true
working-directory: ./packages/react-tree/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-tree-checked publish to NPM
continue-on-error: true
working-directory: ./packages/react-tree-checked/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/react-transfer publish to NPM
continue-on-error: true
working-directory: ./packages/react-transfer/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/utils publish to NPM
continue-on-error: true
working-directory: ./packages/utils/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/uiw publish to NPM
continue-on-error: true
working-directory: ./packages/uiw/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 @uiw/doc publish to NPM
continue-on-error: true
working-directory: ./packages/doc/
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}