Files
2026-07-13 13:34:48 +08:00

46 lines
1.2 KiB
YAML

name: Setup
description: install dependencies and build
inputs:
extra_filters:
description: 'Turbo additional filters to select packages to build'
required: false
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v4 # uses the version from package.json
- uses: actions/setup-node@v6
with:
node-version-file: '.tool-versions'
package-manager-cache: false
- name: Install Node Gyp Build
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: |
npm install -g node-gyp-build
- name: Install dependencies
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: pnpm i --frozen-lockfile
- name: Cache Turbo
uses: actions/cache@v5
with:
path: |
.turbo
node_modules/.cache/turbo
key: turbo-${{ runner.os }}-${{ github.workflow_ref }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Build
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
env:
BP_VERBOSE: 'true'
EXTRA_FILTERS: ${{ inputs.extra_filters }}
run: |
# shellcheck disable=SC2086 # EXTRA_FILTERS contains multiple space-separated filter arguments
pnpm turbo run build $EXTRA_FILTERS