Skip to content

Commit 36a2fe8

Browse files
committed
ci: add release ci
1 parent a0e991e commit 36a2fe8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release new version
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: latest
25+
26+
- name: Setup Nodejs
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: lts/*
30+
cache: pnpm
31+
registry-url: https://registry.npmjs.org
32+
33+
- name: Changelog
34+
run: npx changelogithub
35+
env:
36+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
37+
38+
- name: Install dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- name: Build
42+
run: pnpm run build
43+
44+
# - name: Test
45+
# run: pnpm run test:ci
46+
47+
- name: Publish
48+
run: npm publish
49+
env:
50+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)