Skip to content

Commit b294228

Browse files
committed
ci: use the shared SDK specification action
1 parent 3231a7a commit b294228

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,41 @@ on:
33
branches:
44
- '**'
55
pull_request:
6-
workflow_dispatch:
6+
workflow_call:
7+
inputs:
8+
spec-artifact:
9+
description: >-
10+
Artifact holding the bundled specification. Only reachable when the
11+
caller shares this run; when empty the latest published one is used.
12+
required: false
13+
type: string
14+
default: ''
15+
ref:
16+
description: Ref of this repository to build.
17+
required: false
18+
type: string
19+
default: main
720

821
name: Build
922

1023
jobs:
1124
build:
1225
runs-on: ubuntu-latest
1326
steps:
14-
- uses: actions/checkout@v7
27+
- uses: vrchatapi/specification/.github/actions/sdk-spec@ci/modernise-actions
28+
with:
29+
repository: vrchatapi/vrchatapi-python
30+
ref: ${{ inputs.ref || github.ref }}
31+
generator-version: 6.2.1
32+
spec-artifact: ${{ inputs.spec-artifact }}
1533

1634
- uses: actions/setup-python@v7
1735
with:
1836
python-version: '3.14'
1937

38+
# generate.sh stamps the version into setup.py, so it comes from the spec.
39+
- run: bash ./generate.sh openapi.json "$(jq -r '.info.version' openapi.json)"
40+
2041
- run: python -m pip install --upgrade pip build
2142

2243
- run: python -m build

0 commit comments

Comments
 (0)