Skip to content

Commit df6d605

Browse files
committed
ci: give generation its own job ahead of the checks
1 parent 106b9e3 commit df6d605

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
name: CI
1515

1616
jobs:
17-
build:
17+
generate:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v7
@@ -24,6 +24,32 @@ jobs:
2424

2525
- uses: vrchatapi/specification/.github/actions/download@ci/modernise-actions
2626

27+
- uses: pnpm/setup@v2
28+
with:
29+
runtime: node@24
30+
cache: true
31+
32+
- run: pnpm generate
33+
34+
- uses: actions/upload-artifact@v7
35+
with:
36+
name: generated-javascript
37+
path: src/generated
38+
39+
build:
40+
needs: generate
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v7
44+
with:
45+
repository: vrchatapi/vrchatapi-javascript
46+
ref: ${{ inputs.ref || github.ref }}
47+
48+
- uses: actions/download-artifact@v8
49+
with:
50+
name: generated-javascript
51+
path: src/generated
52+
2753
- uses: pnpm/setup@v2
2854
with:
2955
runtime: node@24

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
7171
pnpm version $version --no-git-tag-version
7272
73+
- run: pnpm generate
74+
7375
- run: pnpm build
7476

7577
# Branches and pull requests get a preview release from pkg.pr.new

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"scripts": {
33-
"prebuild": "rm src/generated -rf && openapi-ts",
33+
"generate": "rm src/generated -rf && openapi-ts",
3434
"build": "tsup"
3535
},
3636
"keywords": [

0 commit comments

Comments
 (0)