-
Notifications
You must be signed in to change notification settings - Fork 1
/
.releaserc.js
55 lines (52 loc) · 1.3 KB
/
.releaserc.js
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
const slackifyMarkdown = require('slackify-markdown')
const { chunkifyString } = require('semantic-release-slack-bot/lib/chunkifier')
const onSuccessFunction = (pluginConfig, context) => {
const releaseNotes = slackifyMarkdown(context.nextRelease.notes)
return {
text: '',
blocks: [
...chunkifyString(releaseNotes, 2900).map((chunk, i) => {
return {
type: 'section',
text: {
type: 'mrkdwn',
text: i === 0 ? '*Storefront Starter Kit* ' + chunk : chunk,
},
}
}),
],
}
}
module.exports = {
branches: ['stable'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/github',
'@semantic-release/npm',
[
'@semantic-release/git',
{
assets: ['package.json'],
message:
'chore(release): ${nextRelease.version}\n\n${nextRelease.notes}',
},
],
[
'semantic-release-slack-bot',
{
notifyOnSuccess: false,
notifyOnFail: false,
markdownReleaseNotes: true,
branchesConfig: [
{
pattern: 'stable',
notifyOnSuccess: true,
onSuccessFunction,
notifyOnFail: false,
},
],
},
],
],
}