-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrelease.config.js
87 lines (82 loc) · 1.6 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const { GIT_BRANCH: branch } = process.env;
const commitAnalyzer = '@semantic-release/commit-analyzer';
const releaseNotesGenerator = '@semantic-release/release-notes-generator';
const git = [
'@semantic-release/git',
{
'assets': [
'CHANGELOG.md',
'README.md',
'package.json',
'package-lock.json',
'yarn.lock',
'architect-yml.md',
'src/dependency-manager/schema/architect.schema.json',
],
},
];
const exec = [
'@semantic-release/exec',
{
'publishCmd': 'npm run pack',
},
];
const npm = '@semantic-release/npm';
const github = [
'@semantic-release/github',
{
'assets': [
{
'path': 'dist/*.tar.gz',
'label': 'Architect-CLI ${nextRelease.version}',
},
],
},
];
const changelog = [
'@semantic-release/changelog',
{
'changelogFile': 'CHANGELOG.md',
},
];
const backmerge = [
'@saithodev/semantic-release-backmerge',
{
'branches': ['rc'],
// Makes sure that only pushed changes are backmerged
'clearWorkspace': true,
},
];
const default_plugins = [
commitAnalyzer,
releaseNotesGenerator,
npm,
git,
];
const main_plugins = [
commitAnalyzer,
releaseNotesGenerator,
changelog,
exec,
npm,
git,
github,
backmerge,
];
// eslint-disable-next-line unicorn/prefer-module
module.exports = {
'branches': [
'main',
{
'name': 'rc',
'prerelease': true,
},
{
'name': 'arc-*',
'prerelease': true,
},
],
plugins: branch === 'main' ? main_plugins : default_plugins,
};
// eslint-disable-next-line unicorn/prefer-module
console.log(module.exports);