Skip to content

Commit

Permalink
build(semantic-release): 馃П add other commit types to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDynamo committed Apr 18, 2024
1 parent 97116ee commit 6b49b2a
Showing 1 changed file with 76 additions and 29 deletions.
105 changes: 76 additions & 29 deletions release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,85 @@ const isMaster = branch === "master" || branch === "main";
* @type {import("semantic-release").GlobalConfig}
*/
const config = {
branches: [
"main",
"master",
{ name: "beta", prerelease: true },
],
branches: ["main", "master", { name: "beta", prerelease: true }],
plugins: [
["@semantic-release/exec", {
// use semantic-release logger to print the branch name
prepareCmd: "echo \"Branch: ${branch}\"",
}],
"@semantic-release/commit-analyzer",
[
"@semantic-release/exec",
{
// use semantic-release logger to print the branch name
prepareCmd: 'echo "Branch: ${branch}"',
},
],
[
"@semantic-release/commit-analyzer",
{
// Modify default release rules to include types that are not breaking change, feat, or fix as a patch release
// Default rules: https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js
releaseRules: [
{
scope: "no-release",
release: false,
},
{
type: "build",
release: "patch",
},
{
type: "ci",
release: "patch",
},
{
type: "chore",
release: "patch",
},
{
type: "docs",
release: "patch",
},
{
type: "refactor",
release: "patch",
},
{
type: "style",
release: "patch",
},
// {
// type: "test",
// release: "patch",
// },
],
},
],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
changelogFile: isBeta ? "CHANGELOG-beta.md" : "CHANGELOG.md",
}],
["@semantic-release/exec", {
prepareCmd: "echo \"${nextRelease.version}\" > latest",
}],
["@semantic-release/git", {
assets: [
"CHANGELOG.md",
"CHANGELOG-beta.md",
"latest"
],
message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
}],
[
"@semantic-release/changelog",
{
changelogFile: isBeta ? "CHANGELOG-beta.md" : "CHANGELOG.md",
},
],
[
"@semantic-release/exec",
{
prepareCmd: 'echo "${nextRelease.version}" > latest',
},
],
[
"@semantic-release/git",
{
assets: ["CHANGELOG.md", "CHANGELOG-beta.md", "latest"],
message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}",
},
],
"@wizarrrr/semantic-release-discord",
["@wizarrrr/semantic-release-sentry-releases", {
sourcemaps: "dist/apps/wizarr-frontend"
}]
]
}
[
"@wizarrrr/semantic-release-sentry-releases",
{
sourcemaps: "dist/apps/wizarr-frontend",
},
],
],
};

if (isMaster) {
config.plugins.splice(-2, 0, "@semantic-release/github");
Expand Down

0 comments on commit 6b49b2a

Please sign in to comment.