Skip to content

Commit 03c7d15

Browse files
authored
Fix: [AEA-0000] - use custom release template and schedule release (#202)
## Summary - Routine Change ### Details - use custom release template - schedule weekly release
1 parent 506192b commit 03c7d15

File tree

6 files changed

+95
-82
lines changed

6 files changed

+95
-82
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
cat semantic-release-output.log
6161
exit 1
6262
fi
63-
tagFormat=$(jq -r .tagFormat .releaserc)
63+
tagFormat=$(node -e "const config=require('./release.config.cjs'); console.log(config.tagFormat)")
6464
if [ "${tagFormat}" = "null" ]
6565
then
6666
tagFormat="v\${version}"

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Release to GitHub Packages
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: "0 8 * * 3"
57

68
jobs:
79
quality_checks:

.releaserc

Lines changed: 0 additions & 80 deletions
This file was deleted.

release.config.cjs

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
2+
const {readFileSync} = require("fs")
3+
4+
const commitTemplate = readFileSync("./releaseNotesTemplates/commit.hbs").toString()
5+
6+
module.exports = {
7+
branches: [
8+
{
9+
name: "main"
10+
}
11+
],
12+
plugins: [
13+
[
14+
"@semantic-release/commit-analyzer",
15+
{
16+
preset: "eslint",
17+
releaseRules: [
18+
{
19+
reminder: "Please update CONTRIBUTING.md if you change this",
20+
release: false
21+
},
22+
{
23+
tag: "Fix",
24+
release: "patch"
25+
},
26+
{
27+
tag: "Update",
28+
release: "patch"
29+
},
30+
{
31+
tag: "New",
32+
release: "minor"
33+
},
34+
{
35+
tag: "Breaking",
36+
release: "major"
37+
},
38+
{
39+
tag: "Docs",
40+
release: "patch"
41+
},
42+
{
43+
tag: "Build",
44+
release: false
45+
},
46+
{
47+
tag: "Upgrade",
48+
release: "patch"
49+
},
50+
{
51+
tag: "Chore",
52+
release: "patch"
53+
}
54+
]
55+
}
56+
],
57+
[
58+
"@semantic-release/release-notes-generator",
59+
{
60+
preset: "eslint",
61+
writerOpts: {
62+
commitPartial: commitTemplate
63+
}
64+
}
65+
],
66+
[
67+
"@semantic-release/changelog",
68+
{
69+
changelogFile: "CHANGELOG.md"
70+
}
71+
],
72+
[
73+
"@semantic-release/github",
74+
{
75+
assets: [
76+
{
77+
path: "CHANGELOG.md",
78+
label: "CHANGELOG.md"
79+
}
80+
],
81+
successComment: false,
82+
failComment: false,
83+
failTitle: false
84+
}
85+
]
86+
]
87+
}

releaseNotesTemplates/commit.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* {{#if message}}{{message}}{{else}}{{header}}{{/if}}
2+
3+
{{~!-- commit hash --}} {{#if @root.linkReferences}}([{{shortHash}}]({{#if @root.host}}{{@root.host}}/{{/if}}{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/{{@root.commit}}/{{hash}})){{else}}{{hash~}}{{/if}}

sonar-project.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ sonar.host.url=https://sonarcloud.io
55
sonar.coverage.exclusions=\
66
**/*.test.*, \
77
**/jest.config.ts,scripts/*, \
8-
eslint.config.mjs
8+
eslint.config.mjs, \
9+
release.config.cjs
910
sonar.javascript.lcov.reportPaths=coverage/lcov.info

0 commit comments

Comments
 (0)