Skip to content

Commit adfd7d0

Browse files
authored
CI: Fail if generate produces files (#71)
For now, this will not commit any files to reduce the amount of work here.
1 parent 1577731 commit adfd7d0

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build
12+
name: Build & Test
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
1617
- name: Set up Node
1718
uses: actions/setup-node@v4
1819
with:
@@ -32,6 +33,19 @@ jobs:
3233

3334
- name: Run tests
3435
run: yarn test
36+
37+
- name: Run generate
38+
run: yarn run generate
39+
40+
- name: Check for changes
41+
id: verify-changed-files
42+
run: |
43+
if [ -n "$(git status --porcelain)" ]; then
44+
git status
45+
exit 1
46+
else
47+
exit 0
48+
fi
3549
3650
- name: Upload artifacts for release via getsentry/craft
3751
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,28 @@ jobs:
2121
with:
2222
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2323
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
24-
- uses: actions/checkout@v3
24+
25+
- uses: actions/checkout@v4
2526
with:
2627
token: ${{ steps.token.outputs.token }}
2728
fetch-depth: 0
29+
30+
- name: Install node modules
31+
run: yarn install --frozen-lockfile
32+
33+
- name: Run generate
34+
run: yarn run generate
35+
36+
- name: Check for changes
37+
id: verify-changed-files
38+
run: |
39+
if [ -n "$(git status --porcelain)" ]; then
40+
git status
41+
exit 1
42+
else
43+
exit 0
44+
fi
45+
2846
- name: Prepare release
2947
uses: getsentry/action-prepare-release@v1
3048
env:

0 commit comments

Comments
 (0)