-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (56 loc) · 1.5 KB
/
ci.yml
File metadata and controls
60 lines (56 loc) · 1.5 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main, master]
push:
branches: [main, master]
workflow_dispatch:
jobs:
test:
strategy:
matrix:
node: ["22.x"]
platform: [ubuntu-latest]
name: Node v${{matrix.node}} ((${{matrix.platform}}))
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
cache: 'pnpm'
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: lint code
run: pnpm run lint
- name: typecheck
run: pnpm run typecheck
- name: build project
run: pnpm run build
release-preview:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.15.0
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'pnpm'
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build project
run: pnpm run build
- name: release preview with pkg-pr-new
working-directory: packages/sdk
run: pnpm dlx pkg-pr-new publish --force
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_SHA: ${{ github.sha }}