brel 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +54 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
## [unreleased]
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Tag after release
|
|
6
|
+
## [0.1.2] - 2026-02-18
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
- Brel release resolution
|
|
11
|
+
|
|
12
|
+
### 💼 Other
|
|
13
|
+
|
|
14
|
+
- Git cliff & changelog
|
|
15
|
+
- Changelog generation
|
|
16
|
+
|
|
17
|
+
### ⚙️ Miscellaneous Tasks
|
|
18
|
+
|
|
19
|
+
- *(release)* V0.1.2
|
|
20
|
+
## [0.1.1] - 2026-02-17
|
|
21
|
+
|
|
22
|
+
### 💼 Other
|
|
23
|
+
|
|
24
|
+
- Npm publish
|
|
25
|
+
- Musl
|
|
26
|
+
|
|
27
|
+
### ⚙️ Miscellaneous Tasks
|
|
28
|
+
|
|
29
|
+
- 0.1.1 patch
|
|
30
|
+
## [0.1.0] - 2026-02-17
|
|
31
|
+
|
|
32
|
+
### 🚀 Features
|
|
33
|
+
|
|
34
|
+
- Initial
|
|
35
|
+
|
|
36
|
+
### 💼 Other
|
|
37
|
+
|
|
38
|
+
- Dist
|
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
- `brel init` generates a managed GitHub Actions workflow.
|
|
8
8
|
- `brel release-pr` computes the next version, updates configured files, commits, pushes, and creates/updates a release PR.
|
|
9
|
+
- `brel next-version` computes the next releasable version and prints it as plain SemVer.
|
|
9
10
|
|
|
10
11
|
## `release-pr` Prerequisites
|
|
11
12
|
|
|
@@ -46,6 +47,14 @@ default_branch = "main"
|
|
|
46
47
|
release_branch_pattern = "brel/release/v{{version}}"
|
|
47
48
|
pr_template_file = ".github/brel/release-pr-body.hbs"
|
|
48
49
|
|
|
50
|
+
[release_pr.changelog]
|
|
51
|
+
enabled = true
|
|
52
|
+
output_file = "CHANGELOG.md"
|
|
53
|
+
|
|
54
|
+
[release_pr.tagging]
|
|
55
|
+
enabled = false
|
|
56
|
+
tag_template = "v{version}"
|
|
57
|
+
|
|
49
58
|
[release_pr.commit_author]
|
|
50
59
|
name = "brel[bot]"
|
|
51
60
|
email = "brel[bot]@users.noreply.github.com"
|
|
@@ -55,7 +64,7 @@ email = "brel[bot]@users.noreply.github.com"
|
|
|
55
64
|
|
|
56
65
|
When you run `brel release-pr`:
|
|
57
66
|
|
|
58
|
-
1. It finds the highest stable SemVer tag
|
|
67
|
+
1. It finds the highest stable SemVer tag that matches `release_pr.tagging.tag_template` (default `v{version}`).
|
|
59
68
|
2. If no valid tag exists, it uses `0.0.0`.
|
|
60
69
|
3. It scans commits since that tag (or all commits when no tag exists).
|
|
61
70
|
4. It picks one bump level from Conventional Commit signals:
|
|
@@ -64,6 +73,11 @@ When you run `brel release-pr`:
|
|
|
64
73
|
- patch: `fix: ...`
|
|
65
74
|
5. If no releasable commits are found, it exits successfully with no changes.
|
|
66
75
|
|
|
76
|
+
`brel next-version` uses the same versioning rules:
|
|
77
|
+
|
|
78
|
+
- when releasable commits exist, it prints the next version (for example `1.2.3`)
|
|
79
|
+
- when none exist, it prints nothing and exits successfully
|
|
80
|
+
|
|
67
81
|
## How File Updates Work
|
|
68
82
|
|
|
69
83
|
- `release_pr.version_updates` maps exact repo-relative file paths to dot-separated key paths.
|
|
@@ -82,11 +96,35 @@ Example key paths:
|
|
|
82
96
|
- JSON: `"package.json" = ["version", "tooling.release.version"]`
|
|
83
97
|
- TOML: `"Cargo.toml" = ["package.version"]`
|
|
84
98
|
|
|
99
|
+
## Changelog Generation (`git-cliff`)
|
|
100
|
+
|
|
101
|
+
- `brel init` generates a workflow that runs [`orhun/git-cliff-action@v4`](https://github.com/orhun/git-cliff-action) by default.
|
|
102
|
+
- Configure changelog behavior with `[release_pr.changelog]`:
|
|
103
|
+
- `enabled` (default `true`)
|
|
104
|
+
- `output_file` (default `"CHANGELOG.md"`)
|
|
105
|
+
- Generated workflow behavior:
|
|
106
|
+
- computes `next-version` first via `brel next-version`
|
|
107
|
+
- runs `git-cliff` only when a next version exists
|
|
108
|
+
- passes `--unreleased --tag <rendered-tag-template>` so the newest changelog section is versioned instead of `[unreleased]`
|
|
109
|
+
- If changelog generation is enabled, `brel release-pr` stages `output_file` in the release commit when that file exists.
|
|
110
|
+
- Disable changelog generation:
|
|
111
|
+
|
|
112
|
+
```toml
|
|
113
|
+
[release_pr.changelog]
|
|
114
|
+
enabled = false
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
- `brel init` does not create or manage `cliff.toml`; keep that file in your repository if you want custom `git-cliff` rules.
|
|
118
|
+
|
|
85
119
|
## Branch / Commit / PR Behavior
|
|
86
120
|
|
|
87
121
|
- Default branch pattern: `brel/release/v{{version}}`
|
|
88
122
|
- Only `{{version}}` is supported as a token.
|
|
89
|
-
-
|
|
123
|
+
- `release_pr.tagging.tag_template` controls rendered release tags (default `v{version}`).
|
|
124
|
+
- `tag_template` accepts `{version}` and legacy `{{version}}` (normalized to `{version}`).
|
|
125
|
+
- `tag_template` must include exactly one version token.
|
|
126
|
+
- Commit message: `chore(release): <rendered-tag>`
|
|
127
|
+
- PR title: `Release <rendered-tag>`
|
|
90
128
|
- Commit author defaults to:
|
|
91
129
|
- `name = "brel[bot]"`
|
|
92
130
|
- `email = "brel[bot]@users.noreply.github.com"`
|
|
@@ -98,6 +136,13 @@ For PRs:
|
|
|
98
136
|
- If found, it updates that PR (continuity wins over recomputing branch name).
|
|
99
137
|
- If not found, it creates a new PR.
|
|
100
138
|
|
|
139
|
+
## Tagging on Merge
|
|
140
|
+
|
|
141
|
+
- Optional config: `[release_pr.tagging] enabled = true` (default `false`).
|
|
142
|
+
- Tag format config: `[release_pr.tagging] tag_template = "v{version}"` (default shown).
|
|
143
|
+
- When enabled, the generated workflow listens for merged pull requests into the configured default branch.
|
|
144
|
+
- If the merged PR is managed by `brel` and titled `Release <rendered-tag>`, the workflow validates it against `tag_template`, then creates and pushes that tag when it does not already exist.
|
|
145
|
+
|
|
101
146
|
## PR Body Templates
|
|
102
147
|
|
|
103
148
|
If `release_pr.pr_template_file` is set, `brel` renders that Handlebars template.
|
|
@@ -105,6 +150,7 @@ If `release_pr.pr_template_file` is set, `brel` renders that Handlebars template
|
|
|
105
150
|
Available variables:
|
|
106
151
|
|
|
107
152
|
- `version`
|
|
153
|
+
- `tag`
|
|
108
154
|
- `base_branch`
|
|
109
155
|
- `release_branch`
|
|
110
156
|
- `commits` (array of `{ sha_short, subject }`)
|
|
@@ -136,3 +182,9 @@ Run with explicit config:
|
|
|
136
182
|
```bash
|
|
137
183
|
brel release-pr --config ./configs/release.toml
|
|
138
184
|
```
|
|
185
|
+
|
|
186
|
+
Preview the next release version:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
brel next-version
|
|
190
|
+
```
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"hasInstallScript": true,
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"name": "brel",
|
|
26
|
-
"version": "0.
|
|
26
|
+
"version": "0.2.0"
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@isaacs/balanced-match": {
|
|
29
29
|
"engines": {
|
|
@@ -515,5 +515,5 @@
|
|
|
515
515
|
}
|
|
516
516
|
},
|
|
517
517
|
"requires": true,
|
|
518
|
-
"version": "0.
|
|
518
|
+
"version": "0.2.0"
|
|
519
519
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://github.com/better-releases/brel/releases/download/0.
|
|
2
|
+
"artifactDownloadUrl": "https://github.com/better-releases/brel/releases/download/0.2.0",
|
|
3
3
|
"bin": {
|
|
4
4
|
"brel": "run-brel.js"
|
|
5
5
|
},
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"zipExt": ".tar.xz"
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
"version": "0.
|
|
100
|
+
"version": "0.2.0",
|
|
101
101
|
"volta": {
|
|
102
102
|
"node": "18.14.1",
|
|
103
103
|
"npm": "9.5.0"
|