Skip to content

Commit a6a4e32

Browse files
committed
Update check-dist workflow
1 parent 3c063ab commit a6a4e32

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/check-dist.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check dist
1+
name: Check Dist
22

33
on:
44
push:
@@ -34,16 +34,18 @@ jobs:
3434
3535
- name: Compare the expected and actual dist/ directories
3636
run: |
37-
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
37+
if [[ -n "$(git status --porcelain 2>/dev/null)" ]]; then
3838
echo "Detected uncommitted changes after build. See status below:"
39-
git diff
39+
git diff --text --ignore-space-at-eol
4040
exit 1
4141
fi
4242
id: diff
4343

4444
- name: Upload expected version if different
45-
uses: actions/upload-artifact@v2
45+
uses: actions/upload-artifact@v3
4646
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4747
with:
4848
name: dist
4949
path: dist/
50+
if-no-files-found: error
51+
retention-days: 1

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)