-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (30 loc) · 1023 Bytes
/
codegen.yaml
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
37
38
name: Code Generation
on:
pull_request:
branches:
- master
types: [opened, edited, synchronize, reopened]
jobs:
stable:
runs-on: ubuntu-latest
strategy:
matrix:
package: ['stable']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: configure node js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Dependencies
run: yarn install --immutable
- name: Run code generation for ${{ matrix.package }} package
run: yarn codegen --package=${{ matrix.package }} generate-types && yarn lint:fix
- name: Identify changed files
id: changed_files
run: echo "::set-output name=changed::$(git status --porcelain | wc -l)"
- name: Files related to code generation was altered
if: steps.changed_files.outputs.changed != 0
run: echo "fix this by running 'yarn codegen --package=${{ matrix.package }} generate-types'" && exit 1