-
Notifications
You must be signed in to change notification settings - Fork 20
43 lines (32 loc) · 1.01 KB
/
main.yml
File metadata and controls
43 lines (32 loc) · 1.01 KB
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
name: Build packages
on: [push, pull_request]
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Build packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable corepack
# https://github.com/nodejs/corepack/issues/627
run: npm i -g --force corepack && corepack enable
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20.19.0'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build all packages
run: pnpm run build
- name: Run all tests
run: pnpm run test
- name: Check if code is formatted
run: pnpm run format --check
- name: Release preview
# Only run on pull requests
if: github.event_name == 'pull_request'
run: pnpx pkg-pr-new publish --compact --comment=update './packages/sonda' './packages/unplugin-sourcemaps'