@r5n/sisyphus 0.4.8 β†’ 0.6.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 CHANGED
@@ -1,546 +1,219 @@
1
- <div align="center">
2
- <a href="https://github.com/r5n-labs">
3
- <img src="https://avatars.githubusercontent.com/u/99986752?s=400&v=4" alt="R5N Labs" width="100" height="100">
4
- </a>
1
+ # Sisyphus
5
2
 
6
- <p><strong>Version Control That Actually Makes Sense πŸͺ¨</strong></p>
7
- <p><em>πŸͺ¨ Because versioning shouldn't feel like pushing a boulder uphill</em></p>
3
+ Monorepo versioning and release tool. Pending changes are recorded as "stones" (JSON files in `.sisyphus/stones/`, in the spirit of changesets); rolling them bumps versions, writes changelogs, tags, publishes, and pushes in one step.
8
4
 
9
- <h1>Sisyphus</h1>
5
+ [![npm](https://img.shields.io/npm/v/@r5n/sisyphus.svg)](https://www.npmjs.com/package/@r5n/sisyphus) [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
10
6
 
11
- <p>
12
- <a href="https://www.npmjs.com/package/@r5n/sisyphus">
13
- <img src="https://img.shields.io/npm/v/@r5n/sisyphus.svg" alt="npm version">
14
- </a>
15
- <a href="https://github.com/r5n-labs/clis/blob/main/packages/sisyphus/LICENSE">
16
- <img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License">
17
- </a>
18
- <img src="https://img.shields.io/badge/bundle%20size-~80KB-green.svg" alt="Bundle Size">
19
- </p>
20
- </div>
7
+ The binary is `sisyphus`, with `sis` as a short alias. Sisyphus runs on [Bun](https://bun.sh) and discovers packages from the `workspaces` globs in your root `package.json`.
21
8
 
22
- ---
23
-
24
- ## Overview
25
-
26
- Ever wished you could stack up version changes like a todo list and release them all at once? That's Sisyphus. It revolutionizes how you handle versioning in monoreposβ€”no more juggling multiple PRs or manual version bumps.
27
-
28
- ### ✨ Why You'll Love It
29
-
30
- - πŸͺ¨ **Stack Your Changes** - Create "stones" as you work, release when you're ready
31
- - 🧞 **Dependency Magic** - Updates related packages automatically (it just knows!)
32
- - πŸ“ **Changelogs That Write Themselves** - From commits to beautiful docs instantly
33
- - πŸš€ **One Command to Rule Them All** - Version, build, publish, tag - done!
34
- - 🏷️ **Alpha to Stable Pipeline** - Smart prerelease promotion workflow
35
- - 🎯 **80KB of Excellence** - Faster than your npm install
36
- - πŸ”„ **GitHub Native** - Creates releases and tags automatically
37
-
38
- ## 🎬 See The Magic
39
-
40
- <details>
41
- <summary><strong>The stone system in action</strong></summary>
42
-
43
- ```bash
44
- $ sisyphus init
45
- βœ” Initialize Sisyphus in single or multi package mode? Β· multi
46
- βœ” Which packages should be ignored? Β· @internal/scripts
47
- βœ” Select a tag for releases Β· latest
48
- βœ” Enable commit configuration? Β· Yes
49
- βœ” Commit message template Β· chore(release): $\{message}
50
- βœ” Enable changelog generation? Β· Yes
51
-
52
- ✨ Sisyphus v0.3.42 is setup to roll stones.
53
-
54
- $ sisyphus version
55
- βœ” Select packages for versioning:
56
- β—‰ @myapp/auth
57
- β—‰ @myapp/core
58
- β—― @myapp/utils
59
- βœ” Select bump type Β· minor
60
- βœ” Provide a summary for these changes Β· Add OAuth2 authentication
61
- βœ” Are you sure you want to create this stone? Β· Yes
62
-
63
- βœ“ Stone created: proud-mountain
64
- Location: .sisyphus/stones/proud-mountain.md
65
- ```
66
- </details>
67
-
68
- <details>
69
- <summary><strong>Smart dependency tracking</strong></summary>
70
-
71
- ```bash
72
- $ sisyphus check
73
- πŸͺ¨ Pending stones (2):
74
-
75
- 1. proud-mountain
76
- Created: 2 days ago
77
- Message: Add OAuth2 authentication
78
-
79
- Package changes:
80
- β€’ @myapp/auth: 1.2.0 β†’ 1.3.0 (minor)
81
- β€’ @myapp/core: 2.1.0 β†’ 2.1.1 (dependency)
82
-
83
- 2. gentle-river
84
- Created: today
85
- Message: Breaking API changes
86
-
87
- Package changes:
88
- β€’ @myapp/api: 3.2.0 β†’ 4.0.0 (major)
89
- β€’ @myapp/cli: 1.0.0 β†’ 2.0.0 (dependency)
90
- β€’ @myapp/sdk: 2.5.0 β†’ 3.0.0 (dependency)
91
-
92
- Last release: v3.2.0 (1 week ago)
93
- Ready to roll 5 packages with 2 stones
94
- ```
95
- </details>
96
-
97
- <details>
98
- <summary><strong>One command release</strong></summary>
99
-
100
- ```bash
101
- $ sisyphus roll --publish --github --changelog
102
- πŸͺ¨ Rolling stones...
103
-
104
- Processing 2 stones:
105
- β€’ proud-mountain
106
- β€’ gentle-river
107
-
108
- πŸ“¦ Updating package versions:
109
- βœ“ @myapp/auth: 1.2.0 β†’ 1.3.0
110
- βœ“ @myapp/core: 2.1.0 β†’ 2.1.1
111
- βœ“ @myapp/api: 3.2.0 β†’ 4.0.0
112
- βœ“ @myapp/cli: 1.0.0 β†’ 2.0.0
113
- βœ“ @myapp/sdk: 2.5.0 β†’ 3.0.0
114
-
115
- πŸ“ Generating changelogs...
116
- βœ“ Updated 5 CHANGELOG.md files
117
- βœ“ Generated root CHANGELOG.md
118
-
119
- πŸš€ Publishing to npm...
120
- βœ“ Published 5 packages
121
-
122
- 🏷️ Creating git tags...
123
- βœ“ Tagged 5 packages
124
- βœ“ Created release tag: v4.0.0
125
-
126
- πŸŽ† GitHub release created: v4.0.0
127
-
128
- βœ“ Cleaned up 2 stones
129
- βœ… Successfully rolled all stones!
130
- ```
131
- </details>
132
-
133
- ## πŸ“¦ Installation
9
+ ## Install
134
10
 
135
11
  ```bash
136
- # Using Bun (recommended)
137
12
  bun add -g @r5n/sisyphus
138
- sisyphus --help
139
-
140
- # Direct usage (no installation)
141
- bunx @r5n/sisyphus --help
142
13
  ```
143
14
 
144
- ## πŸš€ Quick Start
15
+ Or add it as a dev dependency and run it with `bunx @r5n/sisyphus`.
145
16
 
146
- ### 1. Initialize Sisyphus
17
+ ## Quick start
147
18
 
148
19
  ```bash
149
- # Interactive setup
150
20
  sisyphus init
151
-
152
- # Non-interactive with options
153
- sisyphus init --nonInteractive --tag latest
154
- ```
155
-
156
- ### 2. Create Version Stones
157
-
158
- ```bash
159
- # Interactive version creation
160
21
  sisyphus version
161
-
162
- # Quick version with commit message
163
- sisyphus version "feat: add new feature" --packages @org/package-a:minor
164
-
165
- # Specific version bump
166
- sisyphus version --packages @org/core:major @org/utils:patch
167
- ```
168
-
169
- ### 3. Roll Stones (Release)
170
-
171
- ```bash
172
- # Check pending releases
173
22
  sisyphus check
174
-
175
- # Release with all features
176
- sisyphus roll --publish --github
177
-
178
- # Dry run to preview
179
- sisyphus roll --dry-run
23
+ sisyphus roll
180
24
  ```
181
25
 
182
- ## πŸ“– Commands
26
+ `init` writes `.sisyphus/config.json` (flag-driven; an interactive form lives in the `sis -i` menu). `version` with no arguments prompts you to pick packages per bump type and enter a message, then writes a stone. `check` shows workspace packages and what each pending stone will release. `roll` merges all pending stones, applies the version bumps, and deletes the stones.
183
27
 
184
- ### `sisyphus init`
185
- Initialize Sisyphus in your project.
28
+ By default `roll` only updates files and creates the release commit. Publishing, tagging, pushing, and provider releases are opt-in via flags or the `release` section of the config.
186
29
 
187
- **Options:**
188
- - `-i, --ignore <packages>` - Packages to ignore (multiple allowed)
189
- - `-n, --nonInteractive` - Skip interactive prompts
190
- - `-o, --overwrite` - Overwrite existing configuration
191
- - `-s, --single` - Single package mode (non-monorepo)
192
- - `-t, --tag <tag>` - Default release tag (default: "latest")
30
+ ## Commands
193
31
 
194
32
  ### `sisyphus version`
195
- Create a new version stone (changeset).
196
33
 
197
- **Options:**
198
- - `-b, --bump <type>` - Bump type (major/minor/patch)
199
- - `-d, --dryRun` - Preview changes without creating stone
200
- - `-f, --filter <string>` - Filter packages by name
201
- - `-s, --snapshot` - Create snapshot versions
202
- - `-t, --tag <tag>` - Release tag (e.g., "beta", "alpha")
203
- - `-y, --yes` - Skip confirmation prompt
34
+ Create a stone. Interactive when run without positionals; non-interactive with a message and package lists:
204
35
 
205
- **Examples:**
206
36
  ```bash
207
- # Create stone interactively
208
- sisyphus version
209
-
210
- # Create stone with specific bump
211
- sisyphus version --bump minor --filter @org/core
212
-
213
- # Snapshot release
214
- sisyphus version --snapshot --tag dev
215
-
216
- # Skip confirmation
217
- sisyphus version --yes
37
+ sisyphus version "feat: add auth" -m @org/auth -p @org/core
38
+ sisyphus version "fix: rc fixes" -p @org/api -t beta
39
+ sisyphus version --fromCommits
218
40
  ```
219
41
 
220
- ### `sisyphus roll`
221
- Process stones and release packages.
222
-
223
- **Options:**
224
- - `-c, --changelog` - Generate changelog
225
- - `-d, --dryRun` - Preview release without publishing
226
- - `-g, --github` - Create GitHub releases
227
- - `-n, --npm` - Publish to npm
228
- - `-r, --changelogRoot` - Generate root changelog
229
- - `-t, --withTags` - Create git tags
230
- - `--githubToken <token>` - GitHub authentication token
231
- - `--npmToken <token>` - NPM authentication token
232
- - `--rootTag <tag>` - Root package tag
42
+ - `-M, --major` / `-m, --minor` / `-p, --patch` β€” comma-separated package lists
43
+ - `--fromCommits` β€” generate stones from conventional commits since the last release (`lastStone` in config; `commits.skip` filters apply)
44
+ - `-t, --tag` β€” prerelease tag (e.g. `beta`), applied to the computed versions
45
+ - `-f, --filter` β€” filter workspace packages by name
46
+ - `-d, --dryRun`, `-y, --yes`
233
47
 
234
- ### `sisyphus check`
235
- Check current stones and package states.
236
-
237
- **Options:**
238
- - `--debug` - Show debug information
239
- - `--json` - Output in JSON format
240
-
241
- **Output includes:**
242
- - Pending stones with version changes
243
- - Affected packages
244
- - Dependency updates
245
- - Last release information
246
-
247
- ### `sisyphus preview`
248
- Preview what versions will be after rolling stones.
249
-
250
- **Options:**
251
- - `-j, --json` - Output in JSON format
252
- - `-v, --verbose` - Show additional information
253
-
254
- ### `sisyphus prerelease`
255
- Manage prerelease versions (alpha, beta, rc).
256
-
257
- **Options:**
258
- - `-t, --type <type>` - Prerelease type (alpha/beta/rc/canary/dev/next)
259
- - `-b, --bump <type>` - Bump type (major/minor/patch)
260
- - `-p, --promote` - Promote existing prereleases (interactive UI)
261
- - `-f, --filter <string>` - Filter packages
262
- - `-d, --dryRun` - Preview changes
263
- - `-y, --yes` - Skip confirmation
264
-
265
- **Promotion Flow:**
266
- - **Alpha** β†’ Beta, RC, or Stable
267
- - **Beta** β†’ RC or Stable
268
- - **RC/Next** β†’ Stable only
269
-
270
- **Examples:**
271
- ```bash
272
- # Create beta prerelease
273
- sisyphus prerelease --type beta --bump minor
48
+ Packages that depend on the bumped ones are picked up automatically and get a dependency (patch-level) bump.
274
49
 
275
- # Promote prereleases (shows smart options)
276
- sisyphus prerelease --promote
50
+ ### `sisyphus check`
277
51
 
278
- # Non-interactive prerelease
279
- sisyphus prerelease --type alpha --bump patch --filter @org/core --yes
280
- ```
52
+ Show the root package, workspace packages, and pending stones with the versions they will produce. `--json` for machine-readable output (used in CI), `-c, --config` to include the resolved config.
281
53
 
282
54
  ### `sisyphus stone`
283
- Manage pending stones.
284
55
 
285
- **Subcommands:**
286
- - `list` - View all pending stones
287
- - `show <id>` - Display stone content
288
- - `delete <id>` - Remove a stone
289
- - `edit <id>` - Modify stone message
290
- - `merge` - Combine multiple stones
56
+ Manage pending stones: `list` (`-j`, `-v`), `show <id>` (`-j`), `edit <id> -m "new message"`, `merge <id...> -m "message"` (`-d` deletes the originals; conflicting bumps resolve to the highest), `delete <id>`. Subcommands prompt for a stone when no id is given.
291
57
 
292
- ### `sisyphus graph`
293
- Visualize monorepo package dependencies.
58
+ ### `sisyphus roll`
294
59
 
295
- **Options:**
296
- - `-j, --json` - Output in JSON format
297
- - `-f, --filter <string>` - Filter to specific package
298
- - `-d, --depth <number>` - Limit depth of dependency tree
299
- - `-v, --show-versions` - Display package versions
60
+ Execute a release from all pending stones: bump versions, generate changelogs, delete the stones, commit, then optionally tag, publish, push, and create a provider release. Any step failure rolls back the created commit, tags, and file changes and restores the stones.
300
61
 
301
- **Examples:**
302
62
  ```bash
303
- # Show full dependency graph
304
- sisyphus graph
63
+ sisyphus roll --dryRun
64
+ sisyphus roll -n -t -p -y
65
+ ```
305
66
 
306
- # Focus on specific package
307
- sisyphus graph --filter @org/core
67
+ - `-c, --changelog` β€” generate changelogs (default from `changelog.generate`)
68
+ - `-n, --npm` β€” publish to npm (default from `release.npm`)
69
+ - `-t, --tags` β€” create `name@version` git tags (default from `release.tags`)
70
+ - `-p, --push` β€” push commits and tags (default from `release.push`)
71
+ - `-r, --createRelease` β€” create a release on the git provider (default from `release.createRelease`)
72
+ - `--noCommit` β€” skip the release commit (also disables tags, push, and provider release)
73
+ - `--preview` β€” write changelogs, show them, then offer to revert
74
+ - `--publishOnly` β€” publish from `currentRelease` recorded by `actions release-pr`, without touching files
75
+ - `-d, --dryRun`, `-y, --yes`
308
76
 
309
- # Export as JSON
310
- sisyphus graph --json > dependencies.json
311
- ```
77
+ Publishing builds each package (`bun run build`) and runs `npm publish --tag <tag> --access public` in its directory. Private packages (`"private": true`) are skipped. Before publishing, each `package.json` is rewritten to a clean manifest: `workspace:` specifiers are resolved against the actual workspace versions (`workspace:*` pins the exact version, `workspace:^`/`workspace:~` become ranges), `catalog:` specifiers are resolved from the root `catalog`/`catalogs`, and `devDependencies` are stripped. The original file text is restored afterward, even if publishing fails.
78
+
79
+ ### `sisyphus pr`
312
80
 
313
- ### `sisyphus help`
314
- Show help information for commands.
81
+ Create a stone from a pull request (GitHub via the `gh` CLI, which must be installed and authenticated). Reads title, body, labels, commits, and changed files; the bump type comes from labels via `pr.labelMapping`, the title, `-b/--bump`, or a prompt. PRs matching `pr.skip` (labels, authors, title patterns) are ignored.
315
82
 
316
83
  ```bash
317
- sisyphus help
318
- sisyphus help version
319
- sisyphus version --help
84
+ sisyphus pr -u https://github.com/org/repo/pull/123 -y
320
85
  ```
321
86
 
322
- ## πŸ”§ Configuration
87
+ ### `sisyphus migrate`
323
88
 
324
- ### Why Stones? πŸ€”
89
+ Convert an existing `.changeset/` directory to stones and map supported changeset config (`ignore`, `commit`, `access`, `changelog`) onto the Sisyphus config. `-d, --dryRun`, `-y, --yes`.
325
90
 
326
- Traditional versioning forces you to release immediately or lose track of changes. Stones change everything:
91
+ ### `sisyphus actions`
327
92
 
328
- ```
329
- Monday: "Fixed auth bug" β†’ πŸͺ¨ Create stone
330
- Tuesday: "Added user profiles" β†’ πŸͺ¨ Create stone
331
- Wednesday: "Optimized database" β†’ πŸͺ¨ Create stone
332
- Thursday: "Ready to ship!" β†’ 🎯 Roll all stones!
333
- ```
93
+ CI integration. `actions init` detects your provider (GitHub Actions or GitLab CI) and installs workflow templates: a create-stone workflow that turns merged PRs into stones and maintains a release PR, and a release workflow that publishes when the release PR merges (`--all`, `--createStone`, `--release`, `-d`, `-y`). `actions release-pr` creates or updates the `sisyphus/release` branch and PR from pending stones, archives the stones to `.sisyphus/released/<timestamp>/`, and records `currentRelease` in the config for a later `roll --publishOnly`.
94
+
95
+ ### `sisyphus init`
334
96
 
335
- **Benefits:**
336
- - βœ… Stack changes throughout the week
337
- - βœ… Review everything before release
338
- - βœ… Coordinate multi-package updates
339
- - βœ… Never lose track of what needs releasing
340
- - βœ… Git-friendly (stones are just markdown files)
97
+ Create or edit `.sisyphus/config.json`. Flag-driven when invoked directly (the interactive form lives in the `sis -i` menu); every form field has a matching flag (`--single`, `--tag`, `--npm`, `--tags`, `--push`, `--createRelease`, `--changelog`, `--rootChangelog`, `--commitAuthor`, `--commitEmail`, `--commitMessage`). `--default` resets to defaults, `--force` overwrites non-interactively. Also records the current HEAD as `lastStone`, the baseline for `version --fromCommits`.
341
98
 
342
- ### Configuration File
99
+ ## Configuration
343
100
 
344
- Sisyphus uses `.sisyphus/config.json`:
101
+ `.sisyphus/config.json`, created by `init` (trimmed excerpt β€” `init` writes the full default set, including an extended `pr.labelMapping` and commit-skip patterns):
345
102
 
346
103
  ```json
347
104
  {
348
- "$schema": "https://raw.githubusercontent.com/r5n-labs/clis/main/packages/sisyphus/schema.json",
349
- "tag": "latest",
350
- "ignore": ["packages/*-internal"],
105
+ "$schema": "https://raw.githubusercontent.com/r5n-labs/clis/refs/heads/develop/packages/sisyphus/schema.json",
351
106
  "single": false,
107
+ "tag": "latest",
352
108
  "commit": {
353
- "message": "chore(release): ${message}",
354
- "author": "Sisyphus Bot",
355
- "email": "bot@example.com"
356
- },
357
- "release": {
358
- "github": true,
359
- "npm": true,
360
- "tags": true
109
+ "author": "r5n-bot",
110
+ "message": "chore(release): {message}"
361
111
  },
362
112
  "changelog": {
363
113
  "generate": true,
364
- "includeCommits": true
114
+ "root": false,
115
+ "append": true,
116
+ "filename": "CHANGELOG.md",
117
+ "packageHeader": "{emoji} {version} ({date})",
118
+ "rootHeader": "{date} - {packages}"
119
+ },
120
+ "release": {
121
+ "npm": false,
122
+ "tags": false,
123
+ "push": false,
124
+ "createRelease": false
125
+ },
126
+ "commits": {
127
+ "skip": {
128
+ "authors": ["r5n-bot[bot]"],
129
+ "messagePatterns": ["^chore\\(release\\):"]
130
+ }
131
+ },
132
+ "pr": {
133
+ "labelMapping": { "breaking": "major", "feature": "minor", "fix": "patch" },
134
+ "skip": {
135
+ "labels": ["sisyphus-release", "skip-stone"],
136
+ "authors": ["r5n-bot[bot]"],
137
+ "titlePatterns": ["^chore\\(release\\):"]
138
+ }
365
139
  }
366
140
  }
367
141
  ```
368
142
 
369
- ### Stone File Format
370
-
371
- Stones are stored in `.sisyphus/stones/`:
372
-
373
- ```markdown
374
- ### feat: add authentication system
375
-
376
- This adds OAuth2 support and improves security.
377
-
378
- ---
379
-
380
- | minor | patch |
381
- | :-------: | :-----------------: |
382
- | @org/auth | @org/core, @org/api |
383
- ```
384
-
385
- ## πŸ“‚ Project Structure
386
-
387
- ```
388
- your-project/
389
- β”œβ”€β”€ .sisyphus/
390
- β”‚ β”œβ”€β”€ config.json # Sisyphus configuration
391
- β”‚ └── stones/ # Pending version changes
392
- β”‚ β”œβ”€β”€ feat-auth.md
393
- β”‚ └── fix-memory.md
394
- β”œβ”€β”€ packages/
395
- β”‚ β”œβ”€β”€ core/
396
- β”‚ β”‚ β”œβ”€β”€ package.json
397
- β”‚ β”‚ └── CHANGELOG.md # Auto-generated
398
- β”‚ └── auth/
399
- β”‚ β”œβ”€β”€ package.json
400
- β”‚ └── CHANGELOG.md
401
- └── CHANGELOG.md # Root changelog (optional)
402
- ```
403
-
404
- ## πŸ—οΈ Architecture
405
-
406
- ### Technology Stack
407
-
408
- - **Runtime**: Bun (optimized for performance)
409
- - **Validation**: Banditypes (lightweight schemas)
410
- - **CLI Framework**: Custom with @clack/prompts
411
- - **Bundle**: Fully self-contained with zero runtime dependencies
412
-
413
- ### How It Works
414
-
415
- 1. **Stone Creation**: Captures version intent without modifying files
416
- 2. **Dependency Resolution**: Analyzes workspace dependencies
417
- 3. **Version Calculation**: Determines final versions from all stones
418
- 4. **Release Pipeline**: Updates files, builds, publishes, and tags
419
- 5. **Cleanup**: Removes processed stones after success
420
-
421
- ## πŸ“Š Examples
422
-
423
- ### Monorepo Release Flow
424
-
425
- ```bash
426
- # Monday: Feature development
427
- sisyphus version --bump minor --filter @app/core
143
+ - `single` β€” version the root package instead of workspace packages
144
+ - `tag` β€” npm dist-tag used when publishing
145
+ - `commit` β€” release commit author/email and message template; `{message}` and `{packages}` are substituted
146
+ - `changelog` β€” `sections` maps conventional commit types (`feat`, `fix`, `breaking`, ...) to headings; `root` adds a combined root changelog; `packageHeader`/`rootHeader` support `{emoji}`, `{version}`, `{date}`, `{packages}`
147
+ - `commits.skip` / `pr.skip` β€” filters for `version --fromCommits` and `pr`
148
+ - `release` β€” defaults for the corresponding `roll` flags
149
+ - `sisyphusDir` / `stonesPath` β€” relocate the config directory or stone storage
150
+ - `lastStone`, `stones`, `currentRelease` β€” managed by the CLI; don't edit by hand
428
151
 
429
- # Tuesday: Bug fix
430
- sisyphus version --bump patch --filter @app/auth
152
+ ## Stones
431
153
 
432
- # Wednesday: Breaking change
433
- sisyphus version --bump major --filter @app/api
154
+ Each stone is a JSON file at `.sisyphus/stones/<id>.json`, safe to commit and review:
434
155
 
435
- # Friday: Release everything
436
- sisyphus check # Review pending changes
437
- sisyphus roll --npm --github --changelog
156
+ ```json
157
+ {
158
+ "id": "0001-741d2bed",
159
+ "message": "feat: add auth",
160
+ "description": "Optional longer notes",
161
+ "minor": ["@org/auth"],
162
+ "patch": ["@org/api"],
163
+ "dependency": ["@org/app"]
164
+ }
438
165
  ```
439
166
 
440
- ### Prerelease Workflow
167
+ Stones may also carry a `tag` (prerelease) and the `commits` they were generated from. `roll` merges every pending stone, keeping the highest bump per package.
441
168
 
442
- ```bash
443
- # Create beta versions
444
- sisyphus version --bump minor --filter @org/new-feature --tag beta
445
-
446
- # Roll beta release
447
- sisyphus roll --npm
448
-
449
- # Later, promote to stable
450
- sisyphus version --bump minor --filter @org/new-feature --tag latest
451
- sisyphus roll --npm
452
- ```
169
+ ## GitHub Actions
453
170
 
454
- ### CI/CD Integration
171
+ A push-based release job, modeled on this repo's own workflow: roll whenever pending stones land on the main branch. Uses npm trusted publishing (OIDC), which needs `id-token: write` and npm >= 11.5.1, plus each package configured for trusted publishing on npmjs.com. If you don't use OIDC, `roll` publishes with plain `npm publish`, so a granular token in `~/.npmrc` (via `NPM_TOKEN`) works too.
455
172
 
456
173
  ```yaml
457
- # .github/workflows/release.yml
458
174
  name: Release
459
175
 
460
176
  on:
461
177
  push:
462
178
  branches: [main]
463
179
 
180
+ permissions:
181
+ contents: write
182
+ id-token: write
183
+
464
184
  jobs:
465
185
  release:
466
186
  runs-on: ubuntu-latest
187
+ if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
467
188
  steps:
468
189
  - uses: actions/checkout@v4
469
190
  with:
470
191
  fetch-depth: 0
471
- ref: ${{ github.head_ref }}
472
- - uses: oven-sh/setup-bun@v1
473
-
474
- - name: Install dependencies
475
- run: bun install
476
-
477
- - name: Check for stones
478
- id: check
192
+ - uses: oven-sh/setup-bun@v2
193
+ - run: bun install
194
+ - run: npm install -g npm@11
195
+ - name: Check for pending stones
479
196
  run: |
480
- if [ -d ".sisyphus/stones" ] && [ "$(ls -A .sisyphus/stones)" ]; then
481
- echo "has_stones=true" >> $GITHUB_OUTPUT
482
- fi
483
-
484
- - name: Release
485
- if: steps.check.outputs.has_stones == 'true'
486
- run: bunx @r5n/sisyphus roll --npm --github --changelog
197
+ COUNT=$(bunx @r5n/sisyphus check --json | jq '.stones | length')
198
+ echo "STONES_COUNT=$COUNT" >> "$GITHUB_ENV"
199
+ - name: Roll release
200
+ if: env.STONES_COUNT != '0'
201
+ run: |
202
+ git config user.name "github-actions[bot]"
203
+ git config user.email "github-actions[bot]@users.noreply.github.com"
204
+ bunx @r5n/sisyphus roll --yes
487
205
  env:
488
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
489
206
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
490
207
  ```
491
208
 
492
- ## πŸ” Security
493
-
494
- ### Token Management
495
-
496
- - **NPM Publishing**: Requires `NPM_TOKEN` or `--npmToken`
497
- - **GitHub Releases**: Requires `GITHUB_TOKEN` or `--githubToken`
498
- - Tokens are never stored in configuration
499
- - Use environment variables in CI/CD
500
-
501
- ### Best Practices
502
-
503
- 1. Review stones before rolling (`sisyphus check`)
504
- 2. Use dry-run mode for safety
505
- 3. Commit stones to version control
506
- 4. Set up branch protection for release branches
507
-
508
- ## πŸ› Troubleshooting
509
-
510
- ### Common Issues
511
-
512
- 1. **"No stones found"**
513
- - Create stones with `sisyphus version` first
514
- - Check `.sisyphus/stones/` directory
515
-
516
- 2. **"Package not found"**
517
- - Verify package name in version command
518
- - Check if package is ignored in config
519
-
520
- 3. **"Publish failed"**
521
- - Verify NPM token permissions
522
- - Check if version already exists
523
- - Ensure package.json has required fields
524
-
525
- ### Debug Mode
526
-
527
- ```bash
528
- # Verbose logging
529
- DEBUG=* sisyphus roll --dry-run
530
-
531
- # Check configuration
532
- cat .sisyphus/config.json
533
-
534
- # Inspect stones
535
- ls -la .sisyphus/stones/
536
- ```
537
-
538
- ## 🀝 Contributing
209
+ On self-hosted runners, set `NPM_CONFIG_PROVENANCE: "false"` on the roll step; provenance generation only works on GitHub-hosted runners. For the PR-driven flow (stone per merged PR, rolling release PR, publish on merge), run `sisyphus actions init` and commit the generated workflows instead.
539
210
 
540
- Contributions are welcome! Please see the [main repository](https://github.com/r5n-labs/clis) for contribution guidelines.
211
+ ## Requirements
541
212
 
542
- ## πŸ“„ License
213
+ - Bun (the CLI is a Bun executable)
214
+ - git, with a `workspaces` field in the root `package.json` (unless `single`)
215
+ - `gh` CLI, authenticated, for GitHub PR and release operations (`pr`, `actions release-pr`, `roll --createRelease`); GitLab is supported via `GITLAB_TOKEN` or `glab`
543
216
 
544
- Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
217
+ ## License
545
218
 
546
- ---
219
+ Apache 2.0 β€” see [LICENSE](./LICENSE)