Repository navigation
Expand file tree
/
Copy pathrelease.config.cjs
More file actions
44 lines (42 loc) · 1.77 KB
/
Copy pathrelease.config.cjs
File metadata and controls
44 lines (42 loc) · 1.77 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
// The release of one skill. scripts/release-skills.mjs runs semantic-release in the skill's
// directory with this file as its configuration (--extends), so a skill needs no release
// files of its own. The tag is <folder>-v<version>; a package.json there may give another name.
const fs = require("fs");
const path = require("path");
const name = fs.existsSync(path.resolve("package.json"))
? require(path.resolve("package.json")).name
: path.basename(process.cwd());
const pathFilteredAnalyzer = path.resolve(__dirname, "scripts/path-filtered-analyzer.cjs");
const pathFilteredNotesGenerator = path.resolve(__dirname, "scripts/path-filtered-notes-generator.cjs");
module.exports = {
branches: ["main"],
tagFormat: name + "-v${version}",
plugins: [
[pathFilteredAnalyzer, {
releaseRules: [
{ type: "docs", release: "patch" },
{ type: "refactor", release: "patch" },
{ type: "style", release: "patch" },
{ type: "perf", release: "patch" }
]
}],
[pathFilteredNotesGenerator, {}],
["@semantic-release/changelog", {
changelogFile: "CHANGELOG.md"
}],
["@semantic-release/exec", {
prepareCmd: 'bash "$(git rev-parse --show-toplevel)/scripts/prepare-release.sh" "$PWD" "${nextRelease.version}"'
}],
["@semantic-release/github", {
assets: [{ path: "*.skill", label: "Skill package" }],
// A release would comment on and label every PR since the skill's last tag, and every
// PR in the repository's history on its first release, related to the skill or not.
successCommentCondition: false,
releasedLabels: false
}],
["@semantic-release/git", {
assets: ["CHANGELOG.md", "SKILL.md"],
message: "chore(release): " + name + "-v${nextRelease.version} [skip ci]"
}]
]
};