@lobehub/cli 0.0.78 → 0.0.80

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
@@ -4,23 +4,42 @@ LobeHub command-line interface.
4
4
 
5
5
  ## Release to npm
6
6
 
7
- The `Release CLI` GitHub Actions workflow publishes stable versions to npm's
8
- `latest` tag from `canary`. To release, bump `apps/cli/package.json` in a PR:
9
-
10
- ```bash
11
- cd apps/cli
12
- npm version patch --no-git-tag-version
13
- bun run man:generate
14
- ```
15
-
16
- Commit the version and generated manual, complete the checks and any product
17
- acceptance required by the change, then merge the PR into `canary`. CI checks
18
- the registry, tests the CLI bundle, runs the complete `prepublishOnly` build
19
- (including the offline report), smoke-checks it, and publishes with provenance.
20
- The workflow can also be dispatched manually on `canary` to retry a failed run.
21
- Already published versions are skipped; prereleases and versions older than
22
- `latest` are rejected. Registry errors stop the run instead of assuming a
23
- version is unpublished. CI does not change versions or commit back to the repo.
7
+ The `Release CLI` GitHub Actions workflow publishes to npm's `latest` tag when
8
+ CLI production inputs change on `canary`. Merge the feature or fix PR after its
9
+ checks and required product acceptance; no separate version-bump PR is needed.
10
+
11
+ Automatic inputs are `apps/cli/src/**`, build scripts, `package.json`, the CLI
12
+ workspace/TypeScript/tsdown configuration, and the release workflow/helper.
13
+ Tests, fixtures, Markdown documentation, E2E-only changes and generated manuals
14
+ are excluded. Changes only to shared workspace packages or the offline report
15
+ can be released by manually dispatching `Release CLI` on `canary`.
16
+
17
+ CI allocates the next patch above the highest stable npm version (for example,
18
+ `0.0.78` → `0.0.79`). A higher stable version intentionally set in `package.json`
19
+ is honored for a minor/major release. The generated version is used for the
20
+ bundle and manual; CI does not commit version changes back to the branch. The
21
+ checked-in version is therefore a development baseline, not necessarily npm's
22
+ latest release. Use `npm view @lobehub/cli version` to check the published version.
23
+
24
+ The workflow tests the bundle, runs the complete `prepublishOnly` build, checks
25
+ the built CLI and packs it. Immediately before publication it creates a
26
+ `cli-release/v<version>` Git tag pointing at the source commit. The tag reserves
27
+ the version for retries; the published package also records `gitHead`.
28
+ Publication is serialized and the workflow waits up to ten minutes for npm to
29
+ expose the matching version/source under `latest`. A successful upload alone is
30
+ not reported as a verified publication.
31
+
32
+ Use **Re-run failed jobs** on the original run to recover a failed publication.
33
+ A retry reuses its reserved version or skips it if already published. If npm is
34
+ still processing an earlier reserved release, a different commit's release stops
35
+ with a recovery message instead of allocating another version. Older reruns do
36
+ not publish over newer source commits. Build/test failures before reservation
37
+ can be fixed by the next PR normally. Do not delete reservation tags to retry a
38
+ release. Registry errors stop the workflow.
39
+
40
+ GitHub may coalesce queued runs while another release is running; the surviving
41
+ newer commit includes the earlier merged changes. This publishes source snapshots,
42
+ not necessarily one version per merged PR.
24
43
 
25
44
  Publishing uses the repository's `NPM_TOKEN` secret, as the SDK release does.
26
45
  It must have publish permission for `@lobehub/cli` and support unattended