-
Notifications
You must be signed in to change notification settings - Fork 2
/
release.config.js
68 lines (67 loc) · 1.71 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
/* eslint-disable @typescript-eslint/no-var-requires */
const commitTemplate = require("./.github/release-commit.template");
module.exports = {
branches: [
{
name: "release/v+([0-9])?(.{+([0-9]),x}).x",
range: "${name.replace(/^release\\/v/g, '')}",
channel: "${name.replace(/release\\/(v[0-9]+)\\..*/, '$1-lts')}",
},
"main",
"next",
],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "angular",
releaseRules: [
{ breaking: true, release: "major" },
{ revert: true, release: "patch" },
{ type: "feat", release: "minor" },
{ type: "fix", release: "patch" },
{ type: "chore", release: false },
{ type: "docs", release: "patch" },
],
},
],
[
"@semantic-release/release-notes-generator",
{
writerOpts: {
commitPartial: commitTemplate,
},
},
],
"@semantic-release/changelog",
[
"@semantic-release/exec",
{
prepareCmd:
"npm pkg set version=${nextRelease.version} && npm pkg set version=${nextRelease.version} --ws && npx copyfiles CHANGELOG.md ./dist",
},
],
[
"@semantic-release/npm",
{
npmPublish: true,
pkgRoot: "dist/",
tarballDir: "./",
},
],
[
"@semantic-release/github",
{
assets: [{ path: "*.tgz", label: "Package (.tgz)" }],
},
],
// [
// "@semantic-release/git",
// {
// assets: ["package.json", "packages/*/package.json", "CHANGELOG.md"],
// message:
// "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
// },
// ],
],
};