88 spec-artifact :
99 description : >-
1010 Artifact holding the bundled specification. Only reachable when the
11- caller shares this run, so it takes precedence over spec-url .
11+ caller shares this run; when empty the latest published one is used .
1212 required : false
1313 type : string
1414 default : ' '
15- spec-url :
16- description : Where to download the specification from.
17- required : false
18- type : string
19- default : https://github.com/vrchatapi/specification/releases/latest/download/openapi.json
2015 ref :
2116 description : Ref of this repository to build.
2217 required : false
@@ -29,42 +24,21 @@ jobs:
2924 build :
3025 runs-on : ubuntu-latest
3126 steps :
32- # Named explicitly: when this workflow is called, the context belongs to
33- # the caller , so a bare checkout would fetch the caller's repository .
34- - uses : actions/checkout@v7
27+ # This SDK generates through @hey-api/openapi-ts rather than the OpenAPI
28+ # generator , so it only needs the checkout and the specification .
29+ - uses : vrchatapi/specification/.github/ actions/sdk-spec@ci/modernise-actions
3530 with :
3631 repository : vrchatapi/vrchatapi-javascript
3732 ref : ${{ inputs.ref || github.ref }}
33+ spec-artifact : ${{ inputs.spec-artifact }}
3834
3935 - uses : pnpm/action-setup@v6
4036 with :
4137 version : 10
4238 run_install : false
4339
44- - uses : actions/setup-node@v7
45- with :
46- node-version : 24
47- cache : pnpm
48-
49- - if : inputs.spec-artifact != ''
50- uses : actions/download-artifact@v8
51- with :
52- name : ${{ inputs.spec-artifact }}
53- path : .
54-
55- - if : inputs.spec-artifact == ''
56- run : curl -Lfo openapi.json "${{ inputs.spec-url || 'https://github.com/vrchatapi/specification/releases/latest/download/openapi.json' }}"
57-
5840 - run : pnpm install
5941
6042 # `prebuild` regenerates src/generated from ./openapi.json, so this both
6143 # generates against the specification and type-checks the result.
6244 - run : pnpm build
63-
64- - uses : actions/upload-artifact@v7
65- with :
66- name : javascript-${{ github.run_id }}
67- path : |
68- dist
69- src/generated
70- if-no-files-found : ignore
0 commit comments