generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.releaserc.js
85 lines (82 loc) · 2.22 KB
/
.releaserc.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
const { promisify } = require("util");
const dateFormat = require("dateformat");
const { join, resolve } = require("node:path");
const readFileAsync = promisify(require("fs").readFile);
const releaseNotesTemplatePath = resolve(__dirname, "build/release-notes.hbs");
const commitTemplateDir =
"node_modules/semantic-release-gitmoji/lib/assets/templates";
const releaseNotesTemplate = readFileAsync(releaseNotesTemplatePath);
const commitTemplate = readFileAsync(
join(commitTemplateDir, "commit-template.hbs")
);
module.exports = {
branches: [
"main",
"+([0-9])?(.{+([0-9]),x}).x",
"next",
"next-major",
{
name: "alpha",
prerelease: true,
},
{
name: "beta",
prerelease: true,
},
],
plugins: [
[
"semantic-release-gitmoji",
{
releaseRules: {
major: [":boom:"],
minor: [":sparkles:"],
patch: [":bug:", ":ambulance:", ":lock:", ":lipstick:", "arrow_up"],
},
releaseNotes: {
template: releaseNotesTemplate,
partials: { commitTemplate },
helpers: {
datetime: function (format = "UTC:yyyy-mm-dd") {
return dateFormat(new Date(), format);
},
},
issueResolution: {
template: "{baseUrl}/{owner}/{repo}/issues/{ref}",
baseUrl: "https://github.com",
source: "github.com",
removeFromCommit: false,
regex: /#\d+/g,
},
},
},
],
["@semantic-release/npm", { pkgRoot: "./dist" }],
[
"@semantic-release/github",
{
assets: [
"package.json",
"README.md",
"dist/**/*.{ts}",
{
path: "dist/muc-patternlab-vue.es.js",
label: "JS distribution",
},
{
path: "dist/assets/temporary/muenchende-style.css",
label: "CSS distribution",
},
{
path: "dist/assets/temporary/muenchende-fontfaces.css",
label: "CSS fontface distribution",
},
{
path: "dist/assets/temporary/muc-icons.svg",
label: "SVG sprite distribution",
},
],
},
],
],
};