Skip to content

Commit 45a44ec

Browse files
committed
ci: add workflows
1 parent b4a63a8 commit 45a44ec

File tree

2 files changed

+136
-0
lines changed

2 files changed

+136
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release vue-pivottable
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
id-token: write
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '22.10.0'
26+
registry-url: 'https://registry.npmjs.org/'
27+
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v2
30+
with:
31+
version: latest
32+
33+
- name: Install dependencies
34+
run: pnpm install
35+
36+
- name: Build
37+
run: pnpm build
38+
39+
- name: Release
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
run: |
45+
pnpm dlx semantic-release

.releaserc.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"branches": ["main"],
3+
"tagFormat": "vue-pivottable@${version}",
4+
"plugins": [
5+
[
6+
"@semantic-release/commit-analyzer",
7+
{
8+
"preset": "angular",
9+
"parserOpts": {
10+
"headerPattern": "^(\\w*)\\(([\\w\\-]+)\\):\\s(.*)$",
11+
"headerCorrespondence": ["type", "scope", "subject"]
12+
},
13+
"releaseRules": [
14+
{
15+
"type": "feat",
16+
"release": "minor"
17+
},
18+
{ "type": "fix", "release": "patch" },
19+
{
20+
"type": "docs",
21+
"release": "patch"
22+
},
23+
{
24+
"type": "style",
25+
"release": "patch"
26+
},
27+
{
28+
"type": "refactor",
29+
"release": "patch"
30+
},
31+
{
32+
"type": "perf",
33+
"release": "patch"
34+
},
35+
{
36+
"type": "test",
37+
"release": "patch"
38+
},
39+
{
40+
"type": "build",
41+
"release": "patch"
42+
},
43+
{ "type": "ci", "release": "patch" },
44+
{
45+
"type": "chore",
46+
"release": "patch"
47+
}
48+
]
49+
}
50+
],
51+
[
52+
"@semantic-release/release-notes-generator",
53+
{
54+
"preset": "angular",
55+
"parserOpts": {
56+
"headerPattern": "^(\\w*)\\(([\\w\\-]+)\\):\\s(.*)$",
57+
"headerCorrespondence": ["type", "scope", "subject"]
58+
},
59+
"writerOpts": {
60+
"commitsSort": ["scope", "subject"]
61+
}
62+
}
63+
],
64+
[
65+
"@semantic-release/changelog",
66+
{
67+
"changelogFile": "CHANGELOG.md"
68+
}
69+
],
70+
[
71+
"@semantic-release/npm",
72+
{
73+
"pkgRoot": "."
74+
}
75+
],
76+
[
77+
"@semantic-release/git",
78+
{
79+
"assets": ["package.json", "CHANGELOG.md"],
80+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
81+
}
82+
],
83+
[
84+
"@semantic-release/github",
85+
{
86+
"successComment": "🎉 이 PR은 [${nextRelease.version}](https://github.com/vue-pivottable/vue3-pivottable/releases/tag/@vue-pivottable/lazy-table-renderer@${nextRelease.version})에 포함되었습니다.",
87+
"failTitle": "semantic-release 실패"
88+
}
89+
]
90+
]
91+
}

0 commit comments

Comments
 (0)