Skip to content

Commit de27640

Browse files
committed
Add workflow to check precompiled files are up to date
1 parent 0d34654 commit de27640

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Precompile Check
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
check-precompile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
14+
- name: Set up Node.js
15+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
16+
with:
17+
node-version-file: '.nvmrc'
18+
cache: 'npm'
19+
- name: Install dependencies
20+
run: npm ci --legacy-peer-deps
21+
- name: Run precompile
22+
run: npm run precompile
23+
- name: Check for changes
24+
run: |
25+
if [[ -n $(git diff --name-only) ]]; then
26+
echo "The following files have changed:"
27+
git diff --name-only
28+
echo ""
29+
echo "Diff:"
30+
git diff
31+
echo ""
32+
echo "::error:: properties-generated.ts is not in sync. Either the file has been modified manually or it has not been regenerated. Run 'npm run precompile' to regenerate them."
33+
exit 1
34+
fi

0 commit comments

Comments
 (0)