generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 22
36 lines (30 loc) · 981 Bytes
/
pr-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# check incoming pr's and make sure that
# - the code builds
# - the dist folder does not need updating
name: PR Check
on:
push:
pull_request:
jobs:
build-and-check-dist:
name: Run build and check dist folder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '20'
- name: Compile with NPM
run: |
npm ci
npm run compile
npm run package
- name: Check if there are changes that where not in the commit
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Found changes to commit after building. Here is the output from `git status`:"
git status
exit 1
else
echo "No changes found after compiling. PR is good for a review."
fi