Skip to content

Commit 5549c8f

Browse files
committed
ci: add release workflow
1 parent 268894d commit 5549c8f

File tree

3 files changed

+305
-0
lines changed

3 files changed

+305
-0
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Set node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
24+
- run: npx changelogithub
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"prepare": "simple-git-hooks",
2424
"prepack": "pnpm build",
2525
"prepublishOnly": "pnpm lint && pnpm test",
26+
"release": "pnpm test && bumpp && npm publish",
2627
"test": "pnpm test:unit && pnpm test:types",
2728
"test:unit": "vitest",
2829
"test:types": "tsc --noEmit"
@@ -35,6 +36,7 @@
3536
"@antfu/eslint-config": "latest",
3637
"@types/node": "20.12.7",
3738
"@vitest/coverage-v8": "latest",
39+
"bumpp": "^9.4.1",
3840
"eslint": "latest",
3941
"lint-staged": "latest",
4042
"radix3": "1.1.2",

0 commit comments

Comments
 (0)