mirror of
https://github.com/openai/codex-security.git
synced 2026-11-25 11:12:00 +08:00
37 lines
1.4 KiB
YAML
37 lines
1.4 KiB
YAML
name: Set up TypeScript tools
|
|
description: Install the pinned package manager and Node.js runtime for repository tools.
|
|
inputs:
|
|
node-version:
|
|
description: Node.js version for repository tools.
|
|
default: "22.13.0"
|
|
cache-dependency-path:
|
|
description: Lockfiles used for the pnpm store cache.
|
|
default: "sdk/typescript/pnpm-lock.yaml"
|
|
architecture:
|
|
description: Node.js architecture; empty selects the runner architecture.
|
|
compile:
|
|
description: Compile TypeScript tools after setup.
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
with:
|
|
package_json_file: package.json
|
|
# setup-node saves its cache only after a successful job.
|
|
- name: Set up Node.js and pnpm cache
|
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: ${{ inputs.node-version }}
|
|
architecture: ${{ inputs.architecture }}
|
|
cache: pnpm
|
|
cache-dependency-path: ${{ inputs.cache-dependency-path }}
|
|
- name: Compile TypeScript tools
|
|
if: inputs.compile == 'true'
|
|
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
|
|
working-directory: .
|
|
run: |
|
|
pnpm --dir sdk/typescript install --frozen-lockfile
|
|
${{ runner.os == 'Windows' && 'if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }' || '' }}
|
|
pnpm --dir sdk/typescript run build:ci
|