Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use one action to check PR build - use one action to check that there is no breaking change
- Loading branch information
Showing
2 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: PR check | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
check-build-files-in-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm ci | ||
- run: npm run build | ||
- name: Confirm new build included in commit | ||
# language=bash | ||
run: | | ||
# Confirm that the dist was built, and changes included in the commit | ||
if [ $(git status --porcelain dist/index.js | wc -l) -eq "1" ]; then | ||
echo "::error title=Build not committed::Running 'npm run build' changes 'dist/index.js' - build locally and add changes to commit." | ||
exit 1 | ||
fi |
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