-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1009 Bytes
/
codegen.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
name: codegen
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
update-readme:
strategy:
matrix:
os: [ubuntu-latest]
node: [22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Generate stuff
run: cargo run --package mdsf-codegen
# A second run is needed until the readme generation is decoupled from the json-schema
- run: cargo run --package mdsf-codegen
- name: Format stuff
run: npx prettier@latest --write schemas mdsf.json README.md && cargo run -- format README.md
- uses: EndBug/add-and-commit@v9
with:
add: schemas mdsf.json README.md
message: "chore: updated generated code"