This repository was archived by the owner on Jul 8, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathrelease.config.mjs
More file actions
137 lines (132 loc) · 4.17 KB
/
Copy pathrelease.config.mjs
File metadata and controls
137 lines (132 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/* eslint-disable no-undef */
/**
* @type {import('semantic-release').GlobalConfig}
*/
export default {
branches: ["main"],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
parserOpts: {
noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"],
},
releaseRules: [
// Breaking changes - any commit type with ! suffix
{ breaking: true, release: "major" },
// Feature additions (minor version)
{ type: "feat", release: "minor" },
// Bug fixes and patches
{ type: "fix", release: "patch" },
{ type: "perf", release: "patch" },
{ type: "revert", release: "patch" },
// Minor improvements and maintenance
{ type: "refactor", release: "patch" },
{ type: "chore", release: "patch" },
// No release for these types
{ type: "ci", release: false },
{ type: "docs", release: false },
{ type: "test", release: false },
],
},
],
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
presetConfig: {
types: [
{ type: "feat", section: "Features" },
{ type: "fix", section: "Bug Fixes" },
{ type: "perf", section: "Performance" },
{ type: "refactor", section: "Refactors" },
{ type: "revert", section: "Reverts" },
{ type: "chore", section: "Maintenance" },
{ type: "docs", section: "Documentation", hidden: true },
{ type: "test", section: "Tests", hidden: true },
{ type: "ci", section: "CI/CD", hidden: true },
],
},
writerOpts: {
commitsSort: ["subject", "scope"],
},
},
],
[
"@semantic-release/changelog",
{
changelogFile: "CHANGELOG.md",
},
],
"@semantic-release/npm",
[
"@semantic-release/git",
{
assets: ["CHANGELOG.md", "package.json", "package-lock.json"],
message: "chore(release): ${nextRelease.version} [skip_actions]\n\n${nextRelease.notes}",
},
],
[
"@semantic-release/github",
{
assets: [
{
path: "dist.zip",
name: "autokitteh-web-${nextRelease.gitTag}.zip",
label: "autokitteh-web-${nextRelease.gitTag}.zip",
},
{
path: "dist.zip.sha256",
name: "autokitteh-web-${nextRelease.gitTag}.zip.sha256",
label: "autokitteh-web-${nextRelease.gitTag}.zip.sha256",
},
],
successComment:
":tada: This release is now available on [GitHub](${releases.filter(release => /github/i.test(release.name))[0].url})",
failTitle: "The release from branch ${branch.name} had failed",
failComment:
"The release from branch ${branch.name} with version ${nextRelease.version} has failed due to the following errors:\n- ${errors.map(err => err.message).join('\\n- ')}",
},
],
[
"semantic-release-slack-bot",
{
notifyOnSuccess: false,
notifyOnFail: false,
slackWebhook: process.env.SLACK_WEBHOOK_URL,
onSuccessTemplate: {
text:
":announcement: *Meow-velous News, Team!* :announcement: \n" +
"Version *$npm_package_version* has just landed on our digital doorstep, " +
"and it's purr-fectly packed with features!\n\n \n\n" +
":yasss_cat: What's New:\n" +
"$release_notes\t\n\n" +
"Let's make some paw-some progress!\n\n" +
"*Happy Coding, Furr-iends!* " +
":cat-roomba-exceptionally-fast: " +
"*Stay Pawsome!*\n :catjam: _Your Dev Team_ :catjam:",
},
onFailTemplate: {
text:
":red_circle: *Attention Team: Paws for Thought!* :paw_prints:\n" +
"Our latest version *$npm_package_version* has encountered a hiccup," +
" and it's not as purr-fect as we hoped.\n\n" +
":toolbox: *What We're Doing:*\n- Assembling our team of " +
"Cat Coders to hunt down those pesky bugs. Link to our rrrrrrepo: $repo_url \n" +
"- Refining the 'cat-nip' module to ensure it's not too overwhelming.\n\n" +
"*Thank You for Your Patience!* " +
"We're working hard to make things right and appreciate your support.\n\n" +
" :sob_cat: *Stay Tuned for Updates!*\n :catjam: _Your Dev Team_ :catjam:",
},
branchesConfig: [
{
pattern: "main",
notifyOnSuccess: true,
notifyOnFail: true,
},
],
},
],
],
};