-
Notifications
You must be signed in to change notification settings - Fork 357
35 lines (31 loc) · 957 Bytes
/
generated-files.yml
File metadata and controls
35 lines (31 loc) · 957 Bytes
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
name: generated-files
on:
pull_request:
branches: [ main ]
jobs:
check-generated-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- uses: bluefireteam/melos-action@v3
- name: Generate files
run: melos run generate
- name: Check for uncommitted changes
run: |
if ! git diff --quiet; then
echo "❌ Generated files are not up-to-date!"
echo "The following files have uncommitted changes after generation:"
git diff --name-only
echo ""
echo "Please run 'melos run generate' locally and commit the updated files."
echo ""
echo "Changes detected:"
git diff
exit 1
else
echo "✅ All generated files are up-to-date"
fi