Skip to content

Commit f2da5c0

Browse files
committed
add github release action
1 parent 5043784 commit f2da5c0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/release.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
env:
12+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: 'npm'
20+
registry-url: 'https://registry.npmjs.org'
21+
- run: npm ci
22+
- name: Build packages
23+
run: npm run build
24+
- name: Run tests
25+
run: npm test
26+
- name: Publish to NPM
27+
run: |
28+
TAG=${GITHUB_REF#refs/tags/}
29+
npx lerna publish --yes $TAG

0 commit comments

Comments
 (0)