Add review comments #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `dist/index.js` is a special file for Github Actions. | |
# When referenced in a workflow, that's the file that will be run. | |
# We need to make sure the checked-in `index.js` actually matches what we expect it to be. | |
name: verify build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
check-dist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup nodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Rebuild the dist/ directory | |
run: | | |
npm run build | |
npm run package | |
- name: Compare the expected and actual dist/ directories | |
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 |