-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.config.js
65 lines (63 loc) · 1.83 KB
/
release.config.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
64
65
const defaultParams = {
plugins: {
'@semantic-release/npm': { npmPublish: false },
'@semantic-release/git': {
message:
// eslint-disable-next-line no-template-curly-in-string
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
},
defaultBranch: 'main',
};
// TODO: remove after outsourcing @kilojs/semantic-release-config
// this is copy paste from there
function semanticReleaseConfig(params) {
return {
branches: [
'+([0-9])?(.{+([0-9]),x}).x',
params.defaultBranch ?? defaultParams.defaultBranch,
{ name: 'alpha', prerelease: true },
],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
// TODO: remove from semantic release package, since we
// can publish not only from gitlab
// '@semantic-release/gitlab',
// TODO: remove from this function, add ability to pass plugins
'@semantic-release/github',
[
'@semantic-release/npm',
{
...(defaultParams.plugins
? defaultParams.plugins['@semantic-release/npm']
: undefined),
...(params.plugins
? params.plugins['@semantic-release/npm']
: undefined),
},
],
[
'@semantic-release/git',
{
...(defaultParams.plugins
? defaultParams.plugins['@semantic-release/git']
: undefined),
...(params.plugins
? params.plugins['@semantic-release/git']
: undefined),
},
],
],
};
}
module.exports = {
...semanticReleaseConfig({
defaultBranch: 'main',
plugins: {
'@semantic-release/npm': { npmPublish: true },
},
}),
repositoryUrl: 'https://github.com/kilohealth/web-app-monitoring',
};