Skip to content

Commit 0d747f2

Browse files
committed
ci: add a reusable spec check the specification repo can call
1 parent 09bd6cc commit 0d747f2

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/spec-check.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
artifact:
5+
description: Artifact holding the bundled specification, uploaded by the caller.
6+
required: false
7+
type: string
8+
default: openapi.json
9+
ref:
10+
description: Ref of this repository to build against the specification.
11+
required: false
12+
type: string
13+
default: main
14+
15+
name: Spec check
16+
17+
jobs:
18+
build:
19+
name: javascript
20+
runs-on: ubuntu-latest
21+
steps:
22+
# The caller supplies the workflow context, so this repository has to be
23+
# checked out by name rather than implicitly.
24+
- uses: actions/checkout@v7
25+
with:
26+
repository: vrchatapi/vrchatapi-javascript
27+
ref: ${{ inputs.ref }}
28+
29+
- uses: pnpm/action-setup@v6
30+
with:
31+
version: 10
32+
run_install: false
33+
34+
- uses: actions/setup-node@v7
35+
with:
36+
node-version: 24
37+
cache: pnpm
38+
39+
# `openapi-ts.config.ts` reads ./openapi.json, which `pnpm build`
40+
# regenerates the client from.
41+
- uses: actions/download-artifact@v8
42+
with:
43+
name: ${{ inputs.artifact }}
44+
path: .
45+
46+
- run: pnpm install
47+
48+
- run: pnpm build

0 commit comments

Comments
 (0)