Skip to content

ci: use the shared SDK specification action #3

ci: use the shared SDK specification action

ci: use the shared SDK specification action #3

Workflow file for this run

on:
push:
branches:
- '**'
pull_request:
workflow_call:
inputs:
spec-artifact:
description: >-
Artifact holding the bundled specification. Only reachable when the
caller shares this run; when empty the latest published one is used.
required: false
type: string
default: ''
ref:
description: Ref of this repository to build.
required: false
type: string
default: main
name: Build
jobs:
build:
runs-on: ubuntu-latest
steps:
# This SDK generates through @hey-api/openapi-ts rather than the OpenAPI
# generator, so it only needs the checkout and the specification.
- uses: vrchatapi/specification/.github/actions/sdk-spec@ci/modernise-actions
with:
repository: vrchatapi/vrchatapi-javascript
ref: ${{ inputs.ref || github.ref }}
spec-artifact: ${{ inputs.spec-artifact }}
- uses: pnpm/action-setup@v6
with:
version: 10
run_install: false
- run: pnpm install
# `prebuild` regenerates src/generated from ./openapi.json, so this both
# generates against the specification and type-checks the result.
- run: pnpm build