diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4c3d85c6..e50b121ec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,3 +28,19 @@ jobs: - name: Package run: npm run package + + - name: Compare the expected and actual dist/ directories + id: diff + run: | + if [[ $(git status --porcelain) ]]; then + echo "Detected uncommitted changes after build. See status below:" + git status + exit 1 + fi + + # If dist/ was different than expected, upload the expected version as an artifact + - uses: actions/upload-artifact@v2 + if: ${{ failure() && steps.diff.conclusion == 'failure' }} + with: + name: dist + path: dist/