-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.releaserc.js
48 lines (44 loc) · 1.1 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
const { promisify } = require('util');
const ghpages = require('gh-pages');
const execa = require('execa');
const headerPartial = `## {{version}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
`;
const commitPartial = `*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}
`;
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
['@semantic-release/release-notes-generator', {
linkCompare: false,
linkReferences: false,
writerOpts: { headerPartial, commitPartial },
}],
'@semantic-release/changelog',
'@semantic-release/npm',
['@semantic-release/git', {
assets: ['CHANGELOG.md', 'package.json', 'package-lock.json']
}],
['@semantic-release/github', {
successComment: false,
releasedLabels: false,
}],
{
prepare: () => execa('npm', ['run', 'build'], { stdio: 'inherit' }),
publish: () => promisify(ghpages.publish)('public', {
repo: `https://${process.env.GITHUB_TOKEN}@github.com/Flygsand/flygsand.github.io.git`,
branch: 'master',
silent: true,
dotfiles: true
}),
},
],
};