-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
64 lines (61 loc) · 1.89 KB
/
index.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
56
57
58
59
60
61
62
63
'use strict'
const templates = require('./lib/templates/index.js')
const commit = require('./lib/commit.js')
const constants = require('./lib/constants.js')
const now = new Date()
const year = now.getFullYear()
const day = String(now.getDate()).padStart(2, '0')
const month = String(now.getMonth() + 1).padStart(2, '0')
module.exports = {
npmPublish: true
, tarballDir: 'dist'
, parserOpts: {
noteKeywords: ['BREAKING CHANGES', 'BREAKING CHANGE', 'BREAKING']
, headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/
, breakingHeaderPattern: constants.BREAKING_HEADER_REGEX
, headerCorrespondence: ['type', 'scope', 'subject']
, issuePrefixes: ['#', 'gh-']
, referenceActions: [
'close', 'closes', 'closed', 'fix'
, 'fixes', 'fixed', 'resolve', 'resolves'
, 'resolved', 'ref'
]
}
, writerOpts: {
transform: commit.transform
, commitPartial: templates.commit
}
, releaseRules: [
{breaking: true, release: 'major'}
, {type: 'build', release: 'patch'}
, {type: 'ci', release: 'patch'}
, {type: 'chore', release: 'patch'}
, {type: 'doc', release: 'patch'}
, {type: 'feat', release: 'minor'}
, {type: 'fix', release: 'patch'}
, {type: 'lib', release: 'patch'}
, {type: 'perf', release: 'minor'}
, {type: 'refactor', release: 'patch'}
, {type: 'style', release: 'patch'}
, {type: 'test', release: 'patch'}
]
, plugins: [
['@semantic-release/commit-analyzer', null]
, ['@semantic-release/release-notes-generator', null]
, ['@semantic-release/changelog', {
changelogTitle: '## Changelog'
}]
, ['@semantic-release/npm', null]
, ['@semantic-release/git', {
assets: ['package.json', 'CHANGELOG.md', '!**/node_modules/**']
, message: `release: ${year}-${month}-${day}, `
+ 'Version <%= nextRelease.version %> [skip ci]'
}]
, ['@semantic-release/github', {
assets: [
'dist/*'
, 'coverage/*.json'
]
}]
]
}