File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check dist
2+
3+ on :
4+ push :
5+ branches :
6+ - ' 1.x'
7+ paths-ignore :
8+ - ' **.md'
9+ pull_request :
10+ paths-ignore :
11+ - ' **.md'
12+ workflow_dispatch :
13+
14+ jobs :
15+ check-dist :
16+ runs-on : ubuntu-22.04
17+
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v3
21+
22+ - name : Set Node.js 16
23+ uses : actions/setup-node@v3
24+ with :
25+ node-version : ' 16.x'
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Rebuild the dist/ directory
31+ run : |
32+ npm run build
33+ npm run package
34+
35+ - name : Compare the expected and actual dist/ directories
36+ run : |
37+ if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
38+ echo "Detected uncommitted changes after build. See status below:"
39+ git diff
40+ exit 1
41+ fi
42+ id : diff
43+
44+ - name : Upload expected version if different
45+ uses : actions/upload-artifact@v2
46+ if : ${{ failure() && steps.diff.conclusion == 'failure' }}
47+ with :
48+ name : dist
49+ path : dist/
You can’t perform that action at this time.
0 commit comments