Skip to content

Commit d564e36

Browse files
committed
feat(actions): add matrixed build step
1 parent 09f8191 commit d564e36

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,45 @@ jobs:
8383

8484
- name: Check types
8585
run: pnpm tsc
86+
87+
build:
88+
name: Build on Node ${{ matrix.node }} on ${{ matrix.os }}
89+
runs-on: ${{ matrix.os }}
90+
strategy:
91+
matrix:
92+
node: ["16.x", "18.x"]
93+
os: [ubuntu-latest, windows-latest, macOS-latest]
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v3
97+
98+
- name: Setup Node
99+
uses: actions/setup-node@v3
100+
with:
101+
node-version: 18
102+
103+
- uses: pnpm/action-setup@v2
104+
name: Install pnpm
105+
with:
106+
version: 7
107+
run_install: false
108+
109+
- name: Get pnpm store directory
110+
id: pnpm-cache
111+
shell: bash
112+
run: |
113+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
114+
115+
- uses: actions/cache@v3
116+
name: Setup pnpm cache
117+
with:
118+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
119+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
120+
restore-keys: |
121+
${{ runner.os }}-pnpm-store-
122+
123+
- name: Install dependencies
124+
run: pnpm install --frozen-lockfile
125+
126+
- name: Build
127+
run: pnpm build

0 commit comments

Comments
 (0)