Skip to content

Commit bb10e5d

Browse files
add ci cd workflow
1 parent f4dcb60 commit bb10e5d

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: pnpm/action-setup@v4
15+
with:
16+
version: 10
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'pnpm'
22+
23+
- run: pnpm install --frozen-lockfile
24+
- run: pnpm lint
25+
- run: pnpm typecheck
26+
- run: pnpm test
27+
- run: pnpm build

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pnpm/action-setup@v4
19+
with:
20+
version: 10
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
registry-url: 'https://registry.npmjs.org/'
26+
27+
- run: pnpm install --frozen-lockfile
28+
- run: pnpm build
29+
- run: pnpm test
30+
- run: pnpm --filter react-virtualized-diff publish --access public --no-git-checks
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)