-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.release-it.js
38 lines (37 loc) · 1.45 KB
/
.release-it.js
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
// Copyright (c) 2024 Joshua Schmitt
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
module.exports = {
hooks: {
"before:bump": "node scripts/change-api-version.js ${version}",
// edit the CHANGELOG.md file before the release with sed 's/...main/...v\\/${version}/g'
"before:release": "pnpx changelogen@latest --from=${latestTag} --output=CHANGELOG.md && sed -i '' 's/...main/...v\\/${version}/g' CHANGELOG.md && git add CHANGELOG.md",
"after:release": "git pull --tags && git checkout production && git merge main && git push && git checkout main",
},
git: {
commit: true,
tag: true,
push: true,
commitMessage: "chore(release): :rocket: ${version}",
commitArgs: ["-S"],
requireCleanWorkingDir: true,
tagName: "v/${version}",
tagAnnotation : "Release ${version}",
tagArgs: ["-s"],
changelog: "git log ${latestTag}..HEAD --oneline --no-merges",
},
github: {
release: true,
releaseName: "🚀 Release ${version}",
releaseNotes: "pnpx changelogen@latest --from=${latestTag} | tail -n +4 | sed 's/...main/...v\\/${version}/g'",
comments: {
submit: false,
issue: ":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
pr: ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
}
},
npm: {
publish: false,
}
};