brel 0.1.2 → 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 CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [unreleased]
2
2
 
3
+ ### 🚀 Features
4
+
5
+ - Tag after release
6
+ ## [0.1.2] - 2026-02-18
7
+
3
8
  ### 🐛 Bug Fixes
4
9
 
5
10
  - Brel release resolution
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
 
@@ -50,6 +51,10 @@ pr_template_file = ".github/brel/release-pr-body.hbs"
50
51
  enabled = true
51
52
  output_file = "CHANGELOG.md"
52
53
 
54
+ [release_pr.tagging]
55
+ enabled = false
56
+ tag_template = "v{version}"
57
+
53
58
  [release_pr.commit_author]
54
59
  name = "brel[bot]"
55
60
  email = "brel[bot]@users.noreply.github.com"
@@ -59,7 +64,7 @@ email = "brel[bot]@users.noreply.github.com"
59
64
 
60
65
  When you run `brel release-pr`:
61
66
 
62
- 1. It finds the highest stable SemVer tag (`vX.Y.Z` or `X.Y.Z`).
67
+ 1. It finds the highest stable SemVer tag that matches `release_pr.tagging.tag_template` (default `v{version}`).
63
68
  2. If no valid tag exists, it uses `0.0.0`.
64
69
  3. It scans commits since that tag (or all commits when no tag exists).
65
70
  4. It picks one bump level from Conventional Commit signals:
@@ -68,6 +73,11 @@ When you run `brel release-pr`:
68
73
  - patch: `fix: ...`
69
74
  5. If no releasable commits are found, it exits successfully with no changes.
70
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
+
71
81
  ## How File Updates Work
72
82
 
73
83
  - `release_pr.version_updates` maps exact repo-relative file paths to dot-separated key paths.
@@ -92,6 +102,10 @@ Example key paths:
92
102
  - Configure changelog behavior with `[release_pr.changelog]`:
93
103
  - `enabled` (default `true`)
94
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]`
95
109
  - If changelog generation is enabled, `brel release-pr` stages `output_file` in the release commit when that file exists.
96
110
  - Disable changelog generation:
97
111
 
@@ -106,7 +120,11 @@ enabled = false
106
120
 
107
121
  - Default branch pattern: `brel/release/v{{version}}`
108
122
  - Only `{{version}}` is supported as a token.
109
- - Commit message: `chore(release): vX.Y.Z`
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>`
110
128
  - Commit author defaults to:
111
129
  - `name = "brel[bot]"`
112
130
  - `email = "brel[bot]@users.noreply.github.com"`
@@ -118,6 +136,13 @@ For PRs:
118
136
  - If found, it updates that PR (continuity wins over recomputing branch name).
119
137
  - If not found, it creates a new PR.
120
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
+
121
146
  ## PR Body Templates
122
147
 
123
148
  If `release_pr.pr_template_file` is set, `brel` renders that Handlebars template.
@@ -125,6 +150,7 @@ If `release_pr.pr_template_file` is set, `brel` renders that Handlebars template
125
150
  Available variables:
126
151
 
127
152
  - `version`
153
+ - `tag`
128
154
  - `base_branch`
129
155
  - `release_branch`
130
156
  - `commits` (array of `{ sha_short, subject }`)
@@ -156,3 +182,9 @@ Run with explicit config:
156
182
  ```bash
157
183
  brel release-pr --config ./configs/release.toml
158
184
  ```
185
+
186
+ Preview the next release version:
187
+
188
+ ```bash
189
+ brel next-version
190
+ ```
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "brel",
26
- "version": "0.1.2"
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.1.2"
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.1.2",
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.1.2",
100
+ "version": "0.2.0",
101
101
  "volta": {
102
102
  "node": "18.14.1",
103
103
  "npm": "9.5.0"