-
Notifications
You must be signed in to change notification settings - Fork 39
94 lines (81 loc) · 2.64 KB
/
web-assets.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
name: Client (JS)
on:
push:
paths:
- '.github/workflows/web-assets.yml'
- 'WebAssets/**'
- '*.Demo*/**/*.ts'
- '*.Demo*/**/*.css'
- '*.Demo*/**/*.html'
- '*.Demo*/**/package.json'
pull_request:
workflow_dispatch:
jobs:
build-and-publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: 'true'
- uses: actions/setup-node@v4
with:
node-version: '20.14.0'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: 'WebAssets: npm ci'
run: npm ci
working-directory: WebAssets
- name: 'WebAssets: npm run build'
run: npm run build
working-directory: WebAssets
- name: 'WebAssets: npm test'
run: npm test -- --runInBand
working-directory: WebAssets
- name: 'WebAssets: npm run build-storybook'
run: npm run build-storybook
working-directory: WebAssets
- name: 'WebAssets: npm run test-storybook'
run: npm run test-storybook
working-directory: WebAssets
- name: "[Failure] Run actions/upload-artifact@v4 (diff output)"
uses: actions/upload-artifact@v4
if: failure()
with:
name: __diff_output__
path: WebAssets/src/**/__image_snapshots__/__diff_output__
if-no-files-found: ignore
- name: '[Failure] WebAssets: npm run test-storybook-with-update'
run: npm run test-storybook-with-update
working-directory: WebAssets
if: failure()
- name: "[Failure] Run actions/upload-artifact@v4 (updated snapshots)"
uses: actions/upload-artifact@v4
if: failure()
with:
name: '__image_snapshots__ (updated)'
path: WebAssets/src/**/__image_snapshots__
if-no-files-found: ignore
- name: 'AspNetCore.Demo: npm ci'
run: npm ci
working-directory: AspNetCore.Demo
- name: 'AspNetCore.Demo: npm run build'
run: npm run build
working-directory: AspNetCore.Demo
- name: 'AspNetCore.Demo.Net6: npm ci'
run: npm ci
working-directory: AspNetCore.Demo.Net6
- name: 'AspNetCore.Demo.Net6: npm run build'
run: npm run build
working-directory: AspNetCore.Demo.Net6
- name: 'Owin.Demo: npm ci'
run: npm ci
working-directory: Owin.Demo
- name: 'Owin.Demo: npm run build'
run: npm run build
working-directory: Owin.Demo
- if: github.ref == 'refs/heads/main'
uses: JS-DevTools/npm-publish@v1
with:
package: './WebAssets/dist/package.json'
token: ${{ secrets.NPM_TOKEN }}