-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.config.cjs
More file actions
49 lines (42 loc) · 1.76 KB
/
release.config.cjs
File metadata and controls
49 lines (42 loc) · 1.76 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
// Configuration for Shopify theme releases
const config = {
branches: ['+([0-9])?(.{+([0-9]),x}).x', 'master', 'prod', 'main', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}],
plugins: [
// Analyze commits using conventional commit format
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits", // Use the conventional commits preset
releaseRules: [
// Custom rules to recognize `fix` and `chore` commits
{ type: "fix", release: "patch" }, // `fix` commits trigger a patch release
{ type: "chore", release: "patch" }, // `chore` commits trigger a patch release
{ type: "feat", release: "minor" }, // `feat` commits trigger a minor release
{ type: "breaking", release: "major" }, // `breaking` commits trigger a major release
],
},
// Generate release notes
"@semantic-release/release-notes-generator",
// Update version and commit changes
[
"@semantic-release/git",
{
// Files to commit - add any theme files that should be versioned
assets: [
"package.json",
"config/settings_schema.json",
"assets/**/*",
"config/**/*",
"layout/**/*",
"locales/**/*",
"sections/**/*",
"snippets/**/*",
"templates/**/*",
],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
},
],
"@semantic-release/github",
],
};
module.exports = config;