-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.config.js
More file actions
66 lines (61 loc) · 2.07 KB
/
release.config.js
File metadata and controls
66 lines (61 loc) · 2.07 KB
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
module.exports = {
branches: ["main", { name: "release", prerelease: "rc" }],
repositoryUrl: "git@github.com:ApitechFR/jitsi-web-overlay-v3.git",
tagFormat: "v${version}",
plugins: [
[
"@semantic-release/commit-analyzer",
null
],
[
"@semantic-release/release-notes-generator",
{
preset: "angular",
parserOpts: {
noteKeywords: ["BREAKING CHANGE", "BREAKING CHANGES"],
},
writerOpts: {
headerPartial: "# Changelog\n\n",
commitGroupsSort: "title",
commitPartial: "* {{subject}}",
groupBy: "type",
commitGroupsSort: (a, b) => {
const order = ["Features", "Bug Fixes", "BREAKING CHANGES", "Other"];
return order.indexOf(a.title) - order.indexOf(b.title);
},
transform: (commit, context) => {
let type = commit.type;
if (type === "feat") {
commit.groupTitle = "✨ Features";
} else if (type === "fix") {
commit.groupTitle = "🐛 Bug Fixes";
} else if (commit.notes && commit.notes.length > 0) {
commit.groupTitle = "💥 BREAKING CHANGES";
} else {
commit.groupTitle = "Other";
}
return commit;
},
},
},
],
// CHANGELOG.md
["@semantic-release/changelog", { changelogFile: "CHANGELOG.md" }],
// artefact à uploader
["@semantic-release/exec", {
// prepareCmd: "npm run build && tar -czf jitsi-web-overlay-v3.tar.gz jitsi-web-overlay-backend/dist jitsi-web-overlay-frontend/dist"
prepareCmd: "tar -czf jitsi-web-overlay-v3.tar.gz ."
}],
// Commit des fichiers générés (CHANGELOG)
["@semantic-release/git", {
assets: ["CHANGELOG.md"],
message: "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
// Release GitHub + upload de l’asset
["@semantic-release/github", {
assets: ["jitsi-web-overlay-v3.tar.gz"],
successComment: false,
failTitle: false
}]
]
};