Skip to content

Commit 482e8fb

Browse files
committed
ci: 👷 release workflow
1 parent 592fafe commit 482e8fb

3 files changed

Lines changed: 128 additions & 0 deletions

File tree

.github/dependabot.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: /
5+
commit-message:
6+
prefix: "chore(deps): "
7+
prefix-development: "chore(deps-dev): "
8+
schedule:
9+
interval: monthly

.github/workflows/ci.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ci
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
release:
7+
name: release
8+
runs-on: ubuntu-latest
9+
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
10+
env:
11+
CI: true
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
19+
- name: setup node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
24+
- name: Semantic Release
25+
uses: cycjimmy/semantic-release-action@v4
26+
with:
27+
extra_plugins: |
28+
@semantic-release/changelog
29+
@semantic-release/git
30+
@semantic-release/commit-analyzer
31+
@semantic-release/github
32+
@semantic-release/release-notes-generator
33+
conventional-changelog-conventionalcommits
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
[
7+
"@semantic-release/commit-analyzer",
8+
{
9+
"preset": "conventionalcommits",
10+
"releaseRules": [
11+
{
12+
"type": "perf",
13+
"release": "patch"
14+
},
15+
{
16+
"type": "chore",
17+
"scope": "deps",
18+
"release": "patch"
19+
}
20+
]
21+
}
22+
],
23+
[
24+
"@semantic-release/release-notes-generator",
25+
{
26+
"preset": "conventionalcommits",
27+
"presetConfig": {
28+
"types": [
29+
{
30+
"type": "feat",
31+
"section": "✨ Features"
32+
},
33+
{
34+
"type": "fix",
35+
"section": "🐛 Bug Fixes"
36+
},
37+
{
38+
"type": "perf",
39+
"section": "🚀 Performance"
40+
},
41+
{
42+
"type": "chore",
43+
"section": "🧹 Miscellaneous"
44+
},
45+
{
46+
"type": "refactor",
47+
"section": "🧹 Miscellaneous"
48+
},
49+
{
50+
"type": "chore",
51+
"scope": "deps",
52+
"section": "🛠️ Dependencies"
53+
}
54+
]
55+
}
56+
}
57+
],
58+
[
59+
"@semantic-release/changelog",
60+
{
61+
"changelogFile": "CHANGELOG.md"
62+
}
63+
],
64+
[
65+
"@semantic-release/git",
66+
{
67+
"assets": [
68+
"CHANGELOG.md"
69+
],
70+
"message": "chore(release): ${nextRelease.version} [skip ci]"
71+
}
72+
],
73+
[
74+
"@semantic-release/github",
75+
{
76+
"successComment": false,
77+
"failComment": false,
78+
"failTitle": false,
79+
"labels": false,
80+
"releasedLabels": false
81+
}
82+
]
83+
]
84+
}

0 commit comments

Comments
 (0)