super-release 0.15.0 → 1.0.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/README.md +36 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ update `package.json` files, publish to npm, and create git tags -- across all p
|
|
|
14
14
|
- Changelog generation powered by [git-cliff](https://git-cliff.org/)
|
|
15
15
|
- Auto-detects package manager (npm, yarn, pnpm)
|
|
16
16
|
- Configurable tag format templates
|
|
17
|
-
-
|
|
17
|
+
- Build in steps: changelog, npm, exec
|
|
18
18
|
- Global file dependencies and ignore patterns
|
|
19
19
|
- Idempotent: safe to rerun after partial failures
|
|
20
20
|
- Dry-run mode with pretty, truncated output
|
|
@@ -72,6 +72,8 @@ Options:
|
|
|
72
72
|
--show-next-version Print the next version and exit
|
|
73
73
|
-p, --package <PACKAGE> Filter to a specific package (for --show-next-version)
|
|
74
74
|
-v, --verbose Verbose output
|
|
75
|
+
--dangerously-skip-config-check
|
|
76
|
+
Skip config file validation against the JSON schema
|
|
75
77
|
-h, --help Print help
|
|
76
78
|
-V, --version Print version
|
|
77
79
|
```
|
|
@@ -95,7 +97,7 @@ In monorepos, use `--package` to select which package: `super-release --show-nex
|
|
|
95
97
|
4. **Associate commits to packages** -- maps changed files to their owning package (respects `dependencies` and `ignore`
|
|
96
98
|
config)
|
|
97
99
|
5. **Calculate versions** -- determines bump levels from conventional commits
|
|
98
|
-
6. **Run
|
|
100
|
+
6. **Run steps** -- changelog, npm publish, exec commands
|
|
99
101
|
7. **Git finalize** -- commits modified files, creates tags, optionally pushes
|
|
100
102
|
|
|
101
103
|
## Conventional Commits
|
|
@@ -110,15 +112,25 @@ In monorepos, use `--package` to select which package: `super-release --show-nex
|
|
|
110
112
|
|
|
111
113
|
## Configuration
|
|
112
114
|
|
|
113
|
-
Create a `.release.yaml`
|
|
114
|
-
with sensible defaults.
|
|
115
|
+
Create a `.release.yaml` in your repository root. JSON (`.release.json`) and JSONC (`.release.jsonc`) are also
|
|
116
|
+
supported. All fields are optional with sensible defaults.
|
|
115
117
|
|
|
116
|
-
|
|
118
|
+
The config is validated against a bundled [JSON Schema](schema.json) at startup. Use `--dangerously-skip-config-check`
|
|
119
|
+
to bypass validation.
|
|
120
|
+
|
|
121
|
+
For editor autocompletion:
|
|
117
122
|
|
|
118
123
|
```yaml
|
|
119
124
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/bowlingx/super-release/main/schema.json
|
|
120
125
|
```
|
|
121
126
|
|
|
127
|
+
```jsonc
|
|
128
|
+
// .release.jsonc
|
|
129
|
+
{
|
|
130
|
+
"$schema": "https://raw.githubusercontent.com/bowlingx/super-release/main/schema.json"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
122
134
|
### Full Example
|
|
123
135
|
|
|
124
136
|
```yaml
|
|
@@ -153,7 +165,7 @@ ignore:
|
|
|
153
165
|
- "docs/**"
|
|
154
166
|
- "**/*.md"
|
|
155
167
|
|
|
156
|
-
|
|
168
|
+
steps:
|
|
157
169
|
- name: changelog
|
|
158
170
|
- name: npm
|
|
159
171
|
options:
|
|
@@ -247,12 +259,13 @@ exclude:
|
|
|
247
259
|
- my-monorepo-root
|
|
248
260
|
```
|
|
249
261
|
|
|
250
|
-
#### `
|
|
262
|
+
#### `steps`
|
|
251
263
|
|
|
252
|
-
Ordered list of
|
|
264
|
+
Ordered list of steps. Each step has a `name`, optional `packages` and `branches` filters (glob patterns), and
|
|
265
|
+
`options`.
|
|
253
266
|
|
|
254
267
|
```yaml
|
|
255
|
-
|
|
268
|
+
steps:
|
|
256
269
|
- name: changelog
|
|
257
270
|
options:
|
|
258
271
|
filename: CHANGELOG.md
|
|
@@ -260,6 +273,7 @@ plugins:
|
|
|
260
273
|
|
|
261
274
|
- name: npm
|
|
262
275
|
packages: [ "@acme/*" ] # only publish @acme packages
|
|
276
|
+
branches: [ "main", "beta" ] # only run on main and beta branches
|
|
263
277
|
options:
|
|
264
278
|
access: public
|
|
265
279
|
provenance: true
|
|
@@ -277,20 +291,27 @@ plugins:
|
|
|
277
291
|
files: [ Cargo.toml, Cargo.lock ] # include in git commit
|
|
278
292
|
```
|
|
279
293
|
|
|
280
|
-
|
|
294
|
+
Each step can be scoped:
|
|
295
|
+
|
|
296
|
+
- **`packages`** -- glob patterns to filter which packages the step operates on. If empty, the step runs for all
|
|
297
|
+
packages. For example, `packages: ["@acme/*"]` limits an npm publish step to only `@acme`-scoped packages.
|
|
298
|
+
- **`branches`** -- glob patterns for branch names this step runs on. If empty, the step runs on all branches.
|
|
299
|
+
For example, `branches: ["main"]` ensures a step only runs on the main branch.
|
|
300
|
+
|
|
301
|
+
| Step | Prepare | Publish |
|
|
281
302
|
|-------------|----------------------------------------------------|--------------------------------------------------------|
|
|
282
303
|
| `changelog` | Generates/updates changelog per package (parallel) | -- |
|
|
283
304
|
| `npm` | -- | Publishes packages (parallel within dependency levels) |
|
|
284
305
|
| `exec` | Runs custom shell command per package | Runs custom shell command per package |
|
|
285
306
|
|
|
286
|
-
Package version bumps (`package.json`) happen automatically before
|
|
287
|
-
|
|
307
|
+
Package version bumps (`package.json`) happen automatically before steps run (part of core).
|
|
308
|
+
Steps return the files they modified. The core git step stages exactly those files for the commit -- no `git add .`.
|
|
288
309
|
|
|
289
310
|
Default: `[changelog, npm]`
|
|
290
311
|
|
|
291
312
|
#### `git`
|
|
292
313
|
|
|
293
|
-
Core git behavior after all
|
|
314
|
+
Core git behavior after all steps run. Not a step -- always runs.
|
|
294
315
|
|
|
295
316
|
```yaml
|
|
296
317
|
git:
|
|
@@ -307,12 +328,12 @@ Commit message placeholders:
|
|
|
307
328
|
|
|
308
329
|
The git step:
|
|
309
330
|
|
|
310
|
-
1. Stages files reported by
|
|
331
|
+
1. Stages files reported by steps (changelogs, exec `files`, package.json bumps)
|
|
311
332
|
2. Commits (or skips if nothing changed)
|
|
312
333
|
3. Creates annotated tags for each release
|
|
313
334
|
4. Pushes commit + tags if `push: true`
|
|
314
335
|
|
|
315
|
-
Tags are idempotent -- existing tags are skipped. The npm
|
|
336
|
+
Tags are idempotent -- existing tags are skipped. The npm step checks the registry before publishing (`npm view`) and
|
|
316
337
|
skips versions that already exist. Non-404 errors (auth, network) abort the release to prevent partial publishes.
|
|
317
338
|
|
|
318
339
|
## Monorepo Structure
|