-
Notifications
You must be signed in to change notification settings - Fork 62
63 lines (58 loc) · 1.8 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
id-token: write
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20, 22]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
with:
bun-version: latest
- uses: denoland/setup-deno@v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
with:
deno-version: v2.x
- run: pnpm install
- run: pnpm lint
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
- run: pnpm build
- run: pnpm vitest run --coverage
- run: pnpm test:node-register
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
- run: pnpm test:bun --coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
- run: pnpm test:native
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 22 }}
- name: nightly release
if: |
matrix.os == 'ubuntu-latest' && matrix.node == 22 &&
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!startsWith(github.event.head_commit.message, 'docs')
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc &&
pnpm changelogen --canary nightly --publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true