Skip to content

Commit 4091f18

Browse files
committed
ci: run the generator from its jar instead of an npm wrapper
1 parent bc461db commit 4091f18

6 files changed

Lines changed: 6 additions & 2989 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222
repository: vrchatapi/vrchatapi-rust
2323
ref: ${{ inputs.ref || github.ref }}
2424

25-
- uses: vrchatapi/specification/.github/actions/setup@ci/modernise-actions
25+
- uses: vrchatapi/specification/.github/actions/generator@ci/modernise-actions
26+
27+
- uses: vrchatapi/specification/.github/actions/bundle@ci/modernise-actions
2628
with:
27-
generator: 7.21.0
29+
bundle: openapi.json
2830

2931
- uses: moonrepo/setup-rust@v1.3.0
3032

.github/workflows/ci.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,8 @@ jobs:
2626
PASSED_VERSION: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['version'] }}
2727
VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }}
2828
steps:
29-
- uses: actions/setup-node@v7
30-
with:
31-
node-version: 24
3229
- uses: actions/checkout@v7
33-
- name: 'Cache node_modules'
34-
uses: actions/cache@v6.1.0
35-
with:
36-
path: node_modules
37-
key: ${{ runner.os }}-node-v22-${{ hashFiles('**/generate.sh') }}
38-
restore-keys: |
39-
${{ runner.os }}-node-v22
40-
- name: Install OpenAPI Generator CLI
41-
run: npm install @openapitools/openapi-generator-cli
42-
- name: Set OpenAPI Generator version
43-
run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 7.21.0
30+
- uses: vrchatapi/specification/.github/actions/generator@ci/modernise-actions
4431
- name: Set up JDK 20
4532
uses: actions/setup-java@v5.7.0
4633
with:

generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
# Generate Client
1111
rm src/apis src/models docs -rf
1212

13-
./node_modules/\@openapitools/openapi-generator-cli/main.js generate \
13+
openapi-generator generate \
1414
-g rust \
1515
-t ./templates \
1616
'--additional-properties=packageName=vrchatapi,supportAsync=true,avoidBoxedModels=true,library=reqwest,supportMiddleware=true,repositoryUrl="https://github.com/vrchatapi/vrchatapi-rust",description="VRChat API Client for Rust",infoEmail="vrchatapi.lpv0t@aries.fyi"' \

openapitools.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
32
"spaces": 2,
43
"generator-cli": {
54
"version": "7.21.0"

0 commit comments

Comments
 (0)