-
Notifications
You must be signed in to change notification settings - Fork 17
/
release.base.config.js
44 lines (43 loc) · 1.06 KB
/
release.base.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
const defineConfig = (name, srcRoot) => ({
branches: ['main'],
pkgRoot: `dist/${srcRoot}`,
tagFormat: `${name}-v\${version}`,
commitPaths: [srcRoot],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog',
{
changelogFile: `${srcRoot}/CHANGELOG.md`,
},
],
[
'@semantic-release/exec',
{
prepareCmd: [
`node ./tools/scripts/update-version.js \${nextRelease.version} ./${srcRoot}/package.json`,
'pnpm nx format:write --uncommitted',
'pnpm nx affected:lint --fix',
].join(' && '),
},
],
'@semantic-release/npm',
[
'@semantic-release/git',
{
assets: [`${srcRoot}/CHANGELOG.md`, `${srcRoot}/package.json`],
message: `chore(${name}): release v\${nextRelease.version} [skip ci]\n\n\${nextRelease.notes}`,
},
],
[
'@semantic-release/github',
{
addReleases: 'bottom',
},
],
],
});
module.exports = {
defineConfig,
};