-
Notifications
You must be signed in to change notification settings - Fork 0
/
.releaserc.js
70 lines (68 loc) · 1.51 KB
/
.releaserc.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const RELEASE_BRANCH = process.env.RELEASE_BRANCH || "main";
const CHANGELOG_FILE = process.env.CHANGELOG_FILE || "CHANGELOG.md";
const VERSION_FILE = process.env.VERSION_FILE || "src/*/_version.py";
const config = {
branches: [RELEASE_BRANCH],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
},
],
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
},
],
[
"@semantic-release/changelog",
{
changelogFile: CHANGELOG_FILE,
changelogTitle:
"# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines.",
},
],
[
"@semantic-release/exec",
{
prepareCmd: "poetry version ${nextRelease.version}",
},
],
[
"@google/semantic-release-replace-plugin",
{
replacements: [
{
files: [VERSION_FILE],
ignore: ["test/*", "tests/*"],
from: "__version__ = [\"'].*[\"']",
to: '__version__ = "${nextRelease.version}"',
},
],
},
],
[
"@semantic-release/github",
{
assets: [
{ path: "dist/*.tar.gz", label: "sdist" },
{ path: "dist/*.whl", label: "wheel" },
],
successComment: false,
failComment: false,
releasedLabels: false,
failTitle: false,
labels: false,
},
],
[
"@semantic-release/git",
{
assets: ["pyproject.toml", VERSION_FILE, CHANGELOG_FILE],
},
],
],
};
module.exports = config;