Skip to content

Commit e1dda04

Browse files
committed
chore: add release library and workflow
1 parent b4670aa commit e1dda04

File tree

4 files changed

+6392
-642
lines changed

4 files changed

+6392
-642
lines changed

.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+
workflow_dispatch:
5+
6+
env:
7+
node: 20
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: false
23+
- uses: actions/setup-node@v3
24+
with:
25+
cache: npm
26+
node-version: ${{ env.node }}
27+
- run: npm ci
28+
- run: npm audit signatures
29+
- run: npm run release -- --npm.skipChecks
30+
env:
31+
GITHUB_TOKEN: ${{ github.token }}
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.release-it.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"git": {
3+
"commit": true,
4+
"commitMessage": "v${version}",
5+
"push": true,
6+
"requireBranch": "main",
7+
"requireCommits": true,
8+
"requireCommitsFail": true,
9+
"tag": true,
10+
"tagAnnotation": "v${version}"
11+
},
12+
"github": {
13+
"comments": true,
14+
"release": true,
15+
"releaseName": "v${version}",
16+
"web": false
17+
},
18+
"hooks": {
19+
"before:init": "npm run typecheck",
20+
"after:bump": "npm run build"
21+
},
22+
"npm": {
23+
"publish": true
24+
},
25+
"plugins": {
26+
"@release-it/conventional-changelog": {
27+
"infile": "CHANGELOG.md",
28+
"preset": {
29+
"name": "conventionalcommits"
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)