ci: fix build diff check in workflow (#402)

* ci: check Git diff in separate steps

* ci: use `git diff-index` to assert diff
This commit is contained in:
Alfi Maulana 2024-08-07 19:36:45 +07:00 committed by GitHub
parent 44a0a4c6c2
commit 7fb9ce0cbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -23,6 +23,7 @@ jobs:
version: stable version: stable
- name: Build Package - name: Build Package
run: | run: yarn build
yarn build
git diff --exit-code HEAD - name: Check Diff
run: git diff && git diff-index --quiet --exit-code HEAD

View File

@ -23,9 +23,10 @@ jobs:
version: stable version: stable
- name: Check Formatting - name: Check Formatting
run: | run: yarn format
yarn format
git diff --exit-code HEAD - name: Check Diff
run: git diff && git diff-index --quiet --exit-code HEAD
- name: Check Lint - name: Check Lint
run: yarn lint run: yarn lint