merge check-dist.yml into test.yml

This commit is contained in:
Yizhou Mo
2022-08-20 22:35:48 +08:00
parent 3c902f37b8
commit 8b71dde9cc
2 changed files with 14 additions and 53 deletions

View File

@@ -12,6 +12,20 @@ jobs:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run all
- name: Compare the expected and actual dist
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
- name: upload the expected dist
uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
test: # make sure the action works on a clean machine without building
strategy: