-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.17 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-test:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
node-version:
- 22.11.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
publish-alpha:
needs: build-test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22.11.0
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- run: pnpm version 0.0.0-alpha.${{ github.sha}} --no-git-tag-version
- run: pnpm publish --tag alpha --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}