donder-release-cli 1.5.3-beta.1 → 1.5.4

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.
Files changed (2) hide show
  1. package/README.md +230 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -20,16 +20,242 @@ cargo install donder-release
20
20
  npm install -g donder-release-cli
21
21
  ```
22
22
 
23
- ## Usage
23
+ ## Quick start
24
24
 
25
- See CLI options:
25
+ Initialize a configuration file in your project:
26
26
 
27
27
  ```bash
28
- donder-release --help
28
+ donder-release --init
29
29
  ```
30
30
 
31
+ This creates a `donder-release.yaml` file with commented examples for all options.
32
+
33
+ Preview a release without publishing:
34
+
35
+ ```bash
36
+ donder-release --dry-run
37
+ ```
38
+
39
+ Publish a release:
40
+
41
+ ```bash
42
+ donder-release
43
+ ```
44
+
45
+ ## CLI options
46
+
47
+ ```
48
+ -i, --init Initialize configuration file
49
+ -c, --config <FILE> Configuration file path [default: donder-release.yaml]
50
+ -p, --packages Comma-separated list of monorepo packages to release
51
+ --pre-id <ID> Pre-release identifier (e.g. alpha, beta, rc)
52
+ --dry-run Preview a pending release without publishing
53
+ -v, --version Output CLI version
54
+ ```
55
+
56
+ ## Configuration
57
+
58
+ All configuration is done in `donder-release.yaml`.
59
+
60
+ ### release_message
61
+
62
+ The commit message for the release commit. Use `%s` as a placeholder for the version.
63
+
64
+ ```yaml
65
+ release_message: "chore(release): %s"
66
+ ```
67
+
68
+ ### tag_prefix
69
+
70
+ Prefix for release tags.
71
+
72
+ ```yaml
73
+ tag_prefix: v # creates tags like v1.0.0
74
+ ```
75
+
76
+ ### types
77
+
78
+ Commit types that trigger a release. `feat`, `fix` and `revert` are reserved types with fixed bump rules (`feat` = minor, `fix`/`revert` = patch). You can override their section names and add custom types with `minor` or `patch` bumps.
79
+
80
+ ```yaml
81
+ types:
82
+ - { commit_type: feat, section: Features }
83
+ - { commit_type: fix, section: Bug Fixes }
84
+ - { commit_type: perf, bump: patch, section: Performance Improvements }
85
+ ```
86
+
87
+ ### bump_files
88
+
89
+ Files to update with the new version. At least one must be defined. Supported targets: `cargo`, `npm`, `pub`, `android`, `ios`.
90
+
91
+ ```yaml
92
+ bump_files:
93
+ - { target: cargo, path: <root> }
94
+ - { target: npm, path: <root> }
95
+ - { target: pub, path: <root> }
96
+ - { target: android, path: android }
97
+ - { target: ios, path: ios/MyApp }
98
+ ```
99
+
100
+ Use `<root>` to target the directory where donder-release is executed.
101
+
102
+ #### iOS and App Store Connect
103
+
104
+ App Store Connect only allows version numbers as 3 period-separated integers, no pre-release or build metadata strings. To work around this, donder-release translates pre-release identifiers into numeric values for `CURRENT_PROJECT_VERSION`:
105
+
106
+ | Pre-release | CURRENT_PROJECT_VERSION |
107
+ | ----------------------- | ----------------------- |
108
+ | `alpha.N` | `1.N` |
109
+ | `beta.N` | `2.N` |
110
+ | `rc.N` | `3.N` |
111
+ | Other | `4.N` |
112
+ | Stable (no pre-release) | `5.0` |
113
+
114
+ `MARKETING_VERSION` is always set to the semver version without pre-release info (e.g. `1.2.0`).
115
+
116
+ For example, a release of `1.2.0-beta.3` sets:
117
+
118
+ - `MARKETING_VERSION = 1.2.0`
119
+ - `CURRENT_PROJECT_VERSION = 2.3`
120
+
121
+ #### Build metadata
122
+
123
+ Append an auto-incrementing build number to the version:
124
+
125
+ ```yaml
126
+ bump_files:
127
+ - { target: npm, path: <root>, build_metadata: true } # e.g. 1.0.0+1, 1.0.0+2
128
+ ```
129
+
130
+ Build metadata must be numeric. For `android` and `ios` targets, the build number is always incremented automatically.
131
+
132
+ ### changelog_file
133
+
134
+ Write release notes to a changelog file:
135
+
136
+ ```yaml
137
+ changelog_file: CHANGELOG.md
138
+ ```
139
+
140
+ ### clean_pre_releases
141
+
142
+ Delete pre-release tags and GitHub releases when a stable release is published:
143
+
144
+ ```yaml
145
+ clean_pre_releases: true
146
+ ```
147
+
148
+ ### Monorepo support
149
+
150
+ Mark bump files as individual packages to release them independently. Each package gets its own tags, changelog, and version based on commits under its directory.
151
+
152
+ ```yaml
153
+ bump_files:
154
+ - { target: npm, path: packages/api, package: true }
155
+ - { target: npm, path: packages/web, package: true }
156
+ ```
157
+
158
+ Release specific packages:
159
+
160
+ ```bash
161
+ donder-release --packages api,web
162
+ ```
163
+
164
+ ## Pre-releases
165
+
166
+ Create pre-release versions with the `--pre-id` flag:
167
+
168
+ ```bash
169
+ donder-release --pre-id alpha # 1.0.1-alpha.0
170
+ donder-release --pre-id beta # 1.0.1-beta.0
171
+ donder-release --pre-id rc # 1.0.1-rc.0
172
+ ```
173
+
174
+ Subsequent pre-releases auto-increment: `1.0.1-alpha.0` -> `1.0.1-alpha.1`.
175
+
176
+ ## Environment variables
177
+
178
+ | Variable | Description | Default |
179
+ | --------------------- | ------------------------------------------------------ | ----------------------------------- |
180
+ | `GH_TOKEN` | GitHub personal access token (required for publishing) | |
181
+ | `GIT_AUTHOR_NAME` | Git author name | `sbayw-bot` |
182
+ | `GIT_AUTHOR_EMAIL` | Git author email | `<sbayw-bot current primary email>` |
183
+ | `GIT_COMMITTER_NAME` | Git committer name | Falls back to `GIT_AUTHOR_NAME` |
184
+ | `GIT_COMMITTER_EMAIL` | Git committer email | Falls back to `GIT_AUTHOR_EMAIL` |
185
+
186
+ Environment variables can be set in a `donder-release.env` file in your project root.
187
+
188
+ #### GH_TOKEN permissions
189
+
190
+ The `GH_TOKEN` must be a personal access token with **Contents: Read and write** permission on the target repository. This allows donder-release to push commits, tags, and create GitHub releases.
191
+
192
+ If the current branch is protected, the user that created the PAT must be added to the branch protection bypass list (**Settings > Rules > Rulesets** or **Settings > Branches > Allow specified actors to bypass required pull requests**).
193
+
194
+ ## CI / GitHub Actions
195
+
196
+ Example workflow for manual releases:
197
+
198
+ ```yaml
199
+ name: Release
200
+
201
+ on:
202
+ workflow_dispatch:
203
+ inputs:
204
+ type:
205
+ description: Release type
206
+ required: true
207
+ type: choice
208
+ options:
209
+ - release
210
+ - beta
211
+
212
+ jobs:
213
+ release:
214
+ runs-on: ubuntu-latest
215
+ steps:
216
+ - uses: actions/checkout@v6
217
+ with:
218
+ fetch-depth: 0
219
+ persist-credentials: false
220
+
221
+ - uses: dtolnay/rust-toolchain@stable
222
+
223
+ - run: cargo install donder-release
224
+
225
+ - name: Run donder-release
226
+ run: |
227
+ if [ "${{ inputs.type }}" = "beta" ]; then
228
+ donder-release --pre-id beta
229
+ else
230
+ donder-release
231
+ fi
232
+ env:
233
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
234
+ ```
235
+
236
+ > **Note:** Use `persist-credentials: false` on checkout so donder-release authenticates with your `GH_TOKEN` instead of the default `GITHUB_TOKEN`.
237
+
238
+ ## Conventional Commits
239
+
240
+ donder-release follows the [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) specification:
241
+
242
+ ```
243
+ <type>(<optional scope>): <description>
244
+
245
+ [optional body]
246
+
247
+ [optional footer(s)]
248
+ ```
249
+
250
+ Version bumps are determined by commit type:
251
+
252
+ | Commit | Version bump |
253
+ | ------------------------- | ---------------------- |
254
+ | `fix: ...` | Patch (1.0.0 -> 1.0.1) |
255
+ | `feat: ...` | Minor (1.0.0 -> 1.1.0) |
256
+ | `BREAKING CHANGE:` footer | Major (1.0.0 -> 2.0.0) |
257
+
31
258
  #### TODO
32
259
 
33
260
  - Footer links support
34
- - Add documentation
35
261
  - Add support to other git providers(?)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "donder-release-cli",
3
- "version": "1.5.3-beta.1",
3
+ "version": "1.5.4",
4
4
  "description": "Quickly create releases on Github from the command line or CI using conventional commits.",
5
5
  "repository": {
6
6
  "type": "git",