-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (37 loc) · 1.01 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build
on:
workflow_call:
inputs:
package:
description: The name of the package to build
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "./packages/${{ inputs.package }}"
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: "Checkout"
uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/[email protected]
- name: Install deps
run: pnpm i
- name: Build
run: pnpm run build:js
- name: Generate types
run: pnpm run build:types
- name: Create build-output artifact
uses: actions/[email protected]
with:
name: build-output-${{ matrix.node-version }}
path: "./packages/${{ inputs.package }}/dist"