mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-20 08:01:46 +00:00
Share binary builds and dependency caches, run Windows platform checks in parallel, and reuse verified CI evidence for version-only releases. Reuse prebuilt CI image inputs and add read-only release preflight. Co-authored-by: Codex <noreply@openai.com>
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Build frontend
|
|
description: Validate and build the frontend, optionally uploading release assets
|
|
inputs:
|
|
upload-artifact:
|
|
description: Upload frontend-dist for downstream release jobs
|
|
default: 'false'
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
|
|
with:
|
|
package_json_file: frontend/package.json
|
|
|
|
- name: Read build toolchains
|
|
id: toolchains
|
|
shell: bash
|
|
run: ruby .github/scripts/toolchains.rb >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: ${{ steps.toolchains.outputs.node }}
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/pnpm-lock.yaml
|
|
|
|
- name: Install frontend dependencies
|
|
shell: bash
|
|
run: pnpm --dir frontend install --frozen-lockfile
|
|
|
|
- name: Frontend format
|
|
shell: bash
|
|
run: pnpm --dir frontend format:check
|
|
|
|
- name: Frontend build
|
|
shell: bash
|
|
run: pnpm --dir frontend build
|
|
|
|
- name: Upload frontend artifact
|
|
if: inputs.upload-artifact == 'true'
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: frontend-dist
|
|
path: frontend/dist
|
|
if-no-files-found: error
|
|
retention-days: 7
|