@ultikits/cli 2.0.0 → 2.0.1
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 +7 -0
- package/README.md +50 -0
- package/dist/bin/ultikits.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.1]
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Release workflow now uses npm staged publishing via trusted publishing; no functional change. A tagged release
|
|
8
|
+
is staged on npm and becomes installable once a maintainer approves it on npmjs.com with 2FA.
|
|
9
|
+
|
|
3
10
|
## [2.0.0]
|
|
4
11
|
|
|
5
12
|
### Breaking
|
package/README.md
CHANGED
|
@@ -281,6 +281,56 @@ npm run build
|
|
|
281
281
|
npm test
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
+
## Releasing
|
|
285
|
+
|
|
286
|
+
Releases are staged on npm by `.github/workflows/release.yml` through
|
|
287
|
+
[npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers) and
|
|
288
|
+
[staged publishing](https://docs.npmjs.com/cli/v11/commands/npm-stage): the workflow's
|
|
289
|
+
GitHub Actions OIDC token is exchanged for a short-lived credential, so no npm token is
|
|
290
|
+
stored in the repository or its secrets. That credential can only stage a version; a
|
|
291
|
+
maintainer makes it public by approving it with 2FA.
|
|
292
|
+
|
|
293
|
+
1. Open a PR that bumps `version` in `package.json` (and `package-lock.json`, e.g. with
|
|
294
|
+
`npm version X.Y.Z --no-git-tag-version`) and adds the `CHANGELOG.md` entry.
|
|
295
|
+
2. Merge it into `master` once CI is green.
|
|
296
|
+
3. Tag the merge commit and push the tag:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
git checkout master && git pull
|
|
300
|
+
git tag -a vX.Y.Z -m "vX.Y.Z"
|
|
301
|
+
git push origin vX.Y.Z
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
4. The **Release** workflow builds, tests, refuses to continue unless the tag minus `v`
|
|
305
|
+
equals `package.json`'s version and that version is not yet on npm, upgrades npm to
|
|
306
|
+
at least 11.15.0, then runs `npm stage publish --access public`. The run's summary
|
|
307
|
+
shows the stage id. It can also be started by hand (Actions → Release → Run workflow)
|
|
308
|
+
with a `version` input that must equal `package.json`'s version.
|
|
309
|
+
5. Approve the staged version: on npmjs.com open the `@ultikits/cli` package, find the
|
|
310
|
+
staged X.Y.Z, and approve it with your 2FA code (or run `npm stage approve <stage-id>`
|
|
311
|
+
while logged in). Until then the version is not installable and `latest` does not move.
|
|
312
|
+
A wrong build can be discarded with `npm stage reject <stage-id>`.
|
|
313
|
+
|
|
314
|
+
### One-time npmjs.com setup
|
|
315
|
+
|
|
316
|
+
On npmjs.com, open the `@ultikits/cli` package → **Settings** → **Trusted Publisher**,
|
|
317
|
+
choose **GitHub Actions**, and enter:
|
|
318
|
+
|
|
319
|
+
| Field | Value |
|
|
320
|
+
|-------|-------|
|
|
321
|
+
| Organization or user | `UltiKits` |
|
|
322
|
+
| Repository | `ultikits-cli` |
|
|
323
|
+
| Workflow filename | `release.yml` |
|
|
324
|
+
| Environment name | *(leave empty)* |
|
|
325
|
+
| Allowed command | **stage publish only** (`npm stage publish`; `npm publish` is refused) |
|
|
326
|
+
|
|
327
|
+
After the first approved staged release, npm recommends setting **Settings →
|
|
328
|
+
Publishing access** to "Require two-factor authentication and disallow tokens".
|
|
329
|
+
|
|
330
|
+
Because this repository is private, npm does not attach a provenance attestation to
|
|
331
|
+
releases ("Provenance generation is not supported for private repositories, even when
|
|
332
|
+
publishing public packages"); trusted publishing itself still applies.
|
|
333
|
+
|
|
284
334
|
## License
|
|
285
335
|
|
|
286
336
|
[MIT](LICENSE)
|
package/dist/bin/ultikits.js
CHANGED
|
@@ -12,7 +12,7 @@ const program = new Command();
|
|
|
12
12
|
program
|
|
13
13
|
.name('ultikits')
|
|
14
14
|
.description('CLI for publishing UltiTools plugin modules to UltiCloud')
|
|
15
|
-
.version('2.0.
|
|
15
|
+
.version('2.0.1');
|
|
16
16
|
registerLoginCommand(program);
|
|
17
17
|
registerLogoutCommand(program);
|
|
18
18
|
registerWhoamiCommand(program);
|