Skip to content

Commit 50f96f0

Browse files
committed
feat: set up CI/CD
1 parent 7d84a24 commit 50f96f0

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/cd.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pnpm/action-setup@v4
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 20
17+
registry-url: 'https://registry.npmjs.org'
18+
cache: 'pnpm'
19+
cache-dependency-path: '**/pnpm-lock.yaml'
20+
- run: pnpm install --frozen-lockfile
21+
- run: npm test
22+
- run: npm run compile
23+
- run: npm publish
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 20
16+
cache: 'pnpm'
17+
cache-dependency-path: '**/pnpm-lock.yaml'
18+
- run: pnpm install --frozen-lockfile
19+
- run: npm test

0 commit comments

Comments
 (0)