@omnidist/omnidist-linux-arm64 0.1.29 → 0.1.30

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 (3) hide show
  1. package/README.md +247 -336
  2. package/bin/omnidist +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,54 +9,53 @@
9
9
  [![PyPI](https://img.shields.io/pypi/v/omnidist)](https://pypi.org/project/omnidist/)
10
10
  [![license](https://img.shields.io/github/license/metalagman/omnidist)](LICENSE)
11
11
 
12
- Run your Go CLI everywhere with `npx` and `uvx`, without requiring Go on end-user machines.
12
+ Package and publish a Go CLI as npm and uv installable tools with prebuilt
13
+ cross-platform binaries.
13
14
 
14
- `omnidist` turns one Go project into cross-platform npm and uv distributions with prebuilt binaries, then stages, verifies, and publishes them in a deterministic release flow.
15
+ `omnidist` gives Go CLI maintainers one repeatable release flow:
15
16
 
16
- Release flow: `build -> stage -> verify -> publish` so users can run your tool from JavaScript and Python ecosystems out of the box.
17
+ ```text
18
+ build -> stage -> verify -> publish
19
+ ```
17
20
 
18
- For project background, packaging model details, migration notes, and contributor-oriented repo layout, see [CONTRIBUTING.md](CONTRIBUTING.md).
21
+ The generated npm packages use platform-specific optional dependencies, so users
22
+ can run your CLI with `npx` without install-time downloader scripts. The uv
23
+ distribution stages wheel artifacts so users can run the same CLI from Python
24
+ tooling with `uvx`.
19
25
 
20
26
  ## Requirements
21
27
 
22
28
  - Go 1.25+
23
- - Node.js + npm (for npm distribution commands)
24
- - `uv` (for uv distribution commands)
25
- - `git` (when `version.source: git-tag`)
26
- - `NPM_PUBLISH_TOKEN` for npm publish when `distributions.npm.publish-auth: token` (default) and not `--dry-run`
27
- - `UV_PUBLISH_TOKEN` (or `--token`) for uv publish (unless `--dry-run`)
29
+ - Node.js and npm for npm staging, verification, and publishing
30
+ - `uv` for uv staging, verification, and publishing
31
+ - `git` when `version.source: git-tag`
32
+ - `NPM_PUBLISH_TOKEN` for npm token publishing, unless using `--dry-run` or trusted publishing
33
+ - `UV_PUBLISH_TOKEN` or `omnidist uv publish --token` for uv publishing, unless using `--dry-run`
28
34
 
29
- ## Installation
35
+ ## Install
30
36
 
31
- Run without installation first:
37
+ Run without installing:
32
38
 
33
39
  ```bash
34
- npx @omnidist/omnidist --help
40
+ npx -y @omnidist/omnidist@latest --help
35
41
  uvx omnidist --help
36
42
  ```
37
43
 
38
- Install globally with npm:
44
+ Install with npm:
39
45
 
40
46
  ```bash
41
47
  npm i -g @omnidist/omnidist
42
48
  omnidist --help
43
49
  ```
44
50
 
45
- Install with Go toolchain:
51
+ Install with Go:
46
52
 
47
53
  ```bash
48
54
  go install github.com/metalagman/omnidist/cmd/omnidist@latest
49
55
  omnidist --help
50
56
  ```
51
57
 
52
- Build locally from source:
53
-
54
- ```bash
55
- go build -o ./bin/omnidist ./cmd/omnidist
56
- ./bin/omnidist --help
57
- ```
58
-
59
- Or run directly:
58
+ Run from a checkout:
60
59
 
61
60
  ```bash
62
61
  go run ./cmd/omnidist --help
@@ -64,459 +63,371 @@ go run ./cmd/omnidist --help
64
63
 
65
64
  ## Quick Start
66
65
 
67
- 1. Print repo-tailored onboarding/release commands:
68
-
69
- ```bash
70
- omnidist quickstart
71
- ```
72
-
73
- 2. Initialize config and distribution folder structure:
66
+ Initialize an existing Go CLI repository:
74
67
 
75
68
  ```bash
76
69
  omnidist init
77
70
  ```
78
71
 
79
- This creates:
80
- - `.omnidist/omnidist.yaml`
81
- - `.omnidist/` workspace directories
72
+ This creates `.omnidist/omnidist.yaml` and initial workspace directories under
73
+ `.omnidist/default/`. The generated config uses `profiles.default`.
82
74
 
83
- `omnidist init` writes profiles-mode config with a `default` profile.
84
- It also derives default `distributions.npm.package` / `distributions.uv.package`
85
- from the current directory name (slugified).
86
-
87
- 3. Edit config and set environment variables (optional):
75
+ Edit the generated config before building:
88
76
 
89
77
  ```bash
90
78
  $EDITOR .omnidist/omnidist.yaml
91
79
  ```
92
80
 
93
- `omnidist` loads `.env` automatically when present, so you can keep values like `OMNIDIST_VERSION`, `NPM_PUBLISH_TOKEN`, and `UV_PUBLISH_TOKEN` there.
94
-
95
- 4. Build binaries for configured targets:
96
-
97
- ```bash
98
- omnidist build
99
- ```
81
+ At minimum, check these fields:
100
82
 
101
- This also writes the resolved build version to `.omnidist/<profile>/dist/VERSION`
102
- (`.omnidist/default/dist/VERSION` with init defaults).
83
+ - `tool.name`: the binary name users will run.
84
+ - `tool.main`: the Go main package, for example `./cmd/mytool`.
85
+ - `distributions.npm.package`: the npm package, for example `@my-org/mytool`.
86
+ - `distributions.uv.package`: the uv/PyPI package, for example `mytool`.
87
+ - `version.source`: usually `git-tag`, `file`, `env`, or `fixed`.
103
88
 
104
- 5. Stage and verify artifacts:
89
+ Then run the local release pipeline:
105
90
 
106
91
  ```bash
92
+ omnidist build
107
93
  omnidist stage
108
94
  omnidist verify
109
95
  ```
110
96
 
111
- `omnidist uv stage` converts the resolved version to PEP 440 and writes
112
- `.omnidist/<profile>/uv/pyproject.toml` with that version.
113
- It also recreates `.omnidist/<profile>/uv/dist` to prevent stale wheel artifacts from previous runs.
114
- On first stage run, omnidist creates `.omnidist/.gitignore` (if missing).
115
-
116
- 6. Publish when verification passes:
97
+ Publish only after verification passes:
117
98
 
118
99
  ```bash
119
100
  omnidist publish
120
101
  ```
121
102
 
122
- 7. Generate tag-triggered release workflow:
103
+ Generate a GitHub Actions release workflow:
123
104
 
124
105
  ```bash
125
106
  omnidist ci
126
107
  ```
127
108
 
128
- The generated workflow publishes npm and uv artifacts and also creates a GitHub
129
- release with the built cross-platform binaries plus `checksums.txt`.
130
-
131
- ## Common Commands
132
-
133
- ```bash
134
- # Build binaries for configured targets and persist build version
135
- omnidist build
136
-
137
- # Print a quickstart command sequence for this repo
138
- omnidist quickstart
139
-
140
- # Show runtime version/build metadata
141
- omnidist version
142
-
143
- # Stage and verify both distributions (npm -> uv)
144
- omnidist stage
145
- omnidist verify
146
-
147
- # Stage dev/pre-release artifacts
148
- omnidist stage --dev
149
-
150
- # Publish both distributions (fail-fast, npm -> uv)
151
- omnidist publish
152
-
153
- # Generate GitHub Actions workflow for tagged releases
154
- omnidist ci
155
-
156
- # Limit orchestration to one distribution
157
- omnidist stage --only npm
158
- omnidist verify --only uv
159
-
160
- # Distribution-specific publishing options
161
- omnidist npm publish --tag next --otp <6-digit-code>
162
- omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <pypi-token>
163
- ```
164
-
165
- ## Environment Variables and .env
166
-
167
- `omnidist` loads `.env` automatically at startup (via `godotenv`) if present.
168
-
169
- Supported variables:
170
-
171
- - `OMNIDIST_VERSION`: used only when `version.source: env`; also expanded in `build.ldflags` templates (for example `${OMNIDIST_VERSION}`).
172
- `VERSION` is not used.
173
- - `OMNIDIST_CONFIG`: optional global config file path (same as `--config`).
174
- - `OMNIDIST_PROFILE`: optional config profile name (same as `--profile`).
175
- - `OMNIDIST_OMNIDIST_ROOT`: optional project root directory (same as `--omnidist-root`).
176
- - `OMNIDIST_GIT_COMMIT`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` when git metadata is available.
177
- - `OMNIDIST_BUILD_DATE`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` as UTC RFC3339.
178
- - `NPM_PUBLISH_TOKEN`: required for npm publish commands in `token` auth mode when not using `--dry-run`
179
- - `distributions.npm.publish-auth`: npm publish auth mode; `token` uses `NPM_PUBLISH_TOKEN`, `trusted` uses ambient trusted publishing/OIDC
180
- - `distributions.npm.repository-url`: repository URL written to staged package.json `repository.url`; required for trusted npm publishing
181
- - `UV_PUBLISH_TOKEN`: used by uv publish when `--token` is not provided
182
-
183
- Example `.env`:
184
-
185
- ```dotenv
186
- OMNIDIST_VERSION=1.2.3
187
- OMNIDIST_PROFILE=release
188
- NPM_PUBLISH_TOKEN=npm_xxx
189
- UV_PUBLISH_TOKEN=pypi-xxx
190
- ```
109
+ The generated workflow is written to `.github/workflows/omnidist-release.yml`.
110
+ It runs on `v*` tag pushes, builds once, stages and verifies artifacts, publishes
111
+ npm and uv distributions, then uploads the built binaries and `checksums.txt` to
112
+ the GitHub release.
191
113
 
192
114
  ## Configuration
193
115
 
194
- `.omnidist/omnidist.yaml`:
195
-
196
- `omnidist init` now generates the profiles-mode shape (`profiles.default`) by default.
197
- Legacy top-level format remains supported when loading config files.
198
-
199
- ```yaml
200
- tool:
201
- name: omnidist
202
- main: ./cmd/omnidist
203
-
204
- version:
205
- source: git-tag # git-tag | file | env | fixed
206
- file: VERSION # optional; used when source is file (default VERSION)
207
- fixed: 1.2.3 # required when source is fixed
208
-
209
- readme-path: docs/README.md # optional shared README source for staging
210
-
211
- targets:
212
- - os: darwin
213
- arch: amd64
214
- - os: darwin
215
- arch: arm64
216
- - os: linux
217
- arch: amd64
218
- - os: linux
219
- arch: arm64
220
- - os: windows
221
- arch: amd64
222
-
223
- build:
224
- ldflags: -s -w
225
- tags: []
226
- cgo: false
227
-
228
- distributions:
229
- npm:
230
- package: "@omnidist/omnidist"
231
- registry: https://registry.npmjs.org
232
- access: public # public | restricted
233
- publish-auth: token # token | trusted
234
- repository-url: git+https://github.com/your-org/your-repo.git # required for trusted publish
235
- license: MIT # optional override for package.json license; omit to use SEE LICENSE IN <file>
236
- keywords: [cli, ai, llm] # optional npm meta-package keywords
237
- readme-path: docs/npm-readme.md # optional npm-specific README source
238
- include-readme: true # include project README.md in staged packages when present
239
-
240
- uv:
241
- package: omnidist
242
- index-url: https://upload.pypi.org/legacy/
243
- linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
244
- readme-path: docs/uv-readme.md # optional uv-specific README source
245
- include-readme: true # include project README.md in staged wheels when present
246
- ```
247
-
248
- Profiles mode:
116
+ `omnidist init` writes profiles-mode config by default:
249
117
 
250
118
  ```yaml
251
119
  profiles:
252
120
  default:
253
121
  tool:
254
- name: omnidist
255
- main: ./cmd/omnidist
122
+ name: mytool
123
+ main: ./cmd/mytool
124
+
256
125
  version:
257
- source: env
258
- readme-path: docs/README.md
126
+ source: git-tag # git-tag | file | env | fixed
127
+ file: VERSION # used only when source is file
128
+ fixed: 1.2.3 # required only when source is fixed
129
+
259
130
  targets:
131
+ - os: darwin
132
+ arch: amd64
133
+ - os: darwin
134
+ arch: arm64
260
135
  - os: linux
261
136
  arch: amd64
137
+ - os: linux
138
+ arch: arm64
139
+ - os: windows
140
+ arch: amd64
141
+
262
142
  build:
263
143
  ldflags: -s -w
264
144
  tags: []
265
145
  cgo: false
146
+
266
147
  distributions:
267
148
  npm:
268
- package: "@scope/mytool"
269
- keywords: [cli, ai, llm]
270
- readme-path: docs/npm-readme.md
149
+ package: "@my-org/mytool"
150
+ registry: https://registry.npmjs.org
151
+ access: public # public | restricted
152
+ publish-auth: token # token | trusted
153
+ include-readme: true
154
+
271
155
  uv:
272
156
  package: mytool
273
- readme-path: docs/uv-readme.md
274
-
275
- release:
276
- tool:
277
- name: omnidist
278
- main: ./cmd/omnidist
279
- version:
280
- source: fixed
281
- fixed: 1.0.0
282
- targets:
283
- - os: linux
284
- arch: amd64
285
- build:
286
- ldflags: -s -w
287
- tags: []
288
- cgo: false
157
+ index-url: https://upload.pypi.org/legacy/
158
+ linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
159
+ include-readme: true
289
160
  ```
290
161
 
291
- Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`.
292
- If `profiles` is present and no profile is provided, `default` is used.
293
- Mixing top-level runtime fields and `profiles` in the same file is not supported.
162
+ Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`. If `profiles`
163
+ is present and no profile is selected, `default` is used. Profiles write
164
+ artifacts to `.omnidist/<profile>/`.
294
165
 
295
- `targets` use Go values (`GOOS`/`GOARCH`). Distribution workflows map them as needed (for example `windows/amd64` -> npm `win32/x64`).
166
+ Legacy top-level config is still accepted when loading existing config files,
167
+ but do not mix top-level runtime fields with a `profiles` map in the same file.
296
168
 
297
- README source precedence during staging:
298
- `distributions.<name>.readme-path` -> `readme-path` -> `README.md`.
299
- If a configured readme-path is set and cannot be read, staging fails.
169
+ Targets use Go values: `os` is `GOOS`, and `arch` is `GOARCH`. Distribution
170
+ workflows map them as needed, for example `windows/amd64` becomes npm
171
+ `win32/x64`.
300
172
 
301
- When `distributions.npm.keywords` is set, omnidist writes those values to the staged npm meta package `package.json`.
173
+ ## Versioning
302
174
 
303
- For appkit version injection, configure `build.ldflags` in your project config:
175
+ `omnidist build` resolves the release version and writes it to
176
+ `.omnidist/<profile>/dist/VERSION`. Stage and publish commands use that build
177
+ version so npm and uv artifacts stay in sync.
304
178
 
305
- ```yaml
306
- build:
307
- ldflags: -s -w -X github.com/metalagman/appkit/version.version=${OMNIDIST_VERSION} -X github.com/metalagman/appkit/version.gitCommit=${OMNIDIST_GIT_COMMIT} -X github.com/metalagman/appkit/version.buildDate=${OMNIDIST_BUILD_DATE}
308
- ```
179
+ Supported version sources:
309
180
 
310
- `build.ldflags` values are expanded with `os.ExpandEnv` during `omnidist build`.
311
- Both `${VAR}` and `$VAR` are supported; unset vars expand to empty strings.
181
+ - `git-tag`: `HEAD` must be on an exact SemVer tag, either `vX.Y.Z` or `X.Y.Z`.
182
+ - `file`: read the version from `version.file`, defaulting to `VERSION`.
183
+ - `env`: read `OMNIDIST_VERSION`.
184
+ - `fixed`: read `version.fixed`.
312
185
 
313
- With `version.source: git-tag`, release workflows require `HEAD` to be on an exact SemVer tag (`vX.Y.Z` or `X.Y.Z`).
186
+ For local prerelease staging, use:
314
187
 
315
- With `version.source: file`, omnidist reads `./VERSION` from the repository root.
316
-
317
- With `version.source: file`, you can override the path via `version.file` (for example `versions/release.txt`).
318
-
319
- With `version.source: fixed`, set `version.fixed` to an exact value in config (for example `1.2.3`).
188
+ ```bash
189
+ omnidist stage --dev
190
+ ```
320
191
 
321
- With `version.source: env`, set `OMNIDIST_VERSION` (for example in `.env`) before build/stage/publish.
192
+ `--dev` generates prerelease artifact versions from git metadata. For npm
193
+ publishing, `-dev` prerelease versions are automatically published with
194
+ `--tag dev` when no tag is supplied.
322
195
 
323
- Use global `--omnidist-root <path>` to set the project root for a command. Omnidist resolves it to an absolute path at startup and changes working directory to it before loading `.env` and config.
196
+ ## Environment and Build Variables
324
197
 
325
- Workspace behavior:
326
- - Legacy config writes artifacts to `.omnidist/*`.
327
- - Profiles config writes artifacts to `.omnidist/<profile>/*`.
328
- - Isolation is by profile name. If different config files use the same profile name in the same repo, they share the same `.omnidist/<profile>` workspace.
198
+ `omnidist` loads `.env` at startup when the file exists.
329
199
 
330
- ## Command Reference
200
+ Environment variables:
331
201
 
332
- Top-level:
202
+ - `OMNIDIST_VERSION`: used only when `version.source: env`. `VERSION` is not used.
203
+ - `OMNIDIST_CONFIG`: config file path, equivalent to `--config`.
204
+ - `OMNIDIST_PROFILE`: config profile name, equivalent to `--profile`.
205
+ - `OMNIDIST_OMNIDIST_ROOT`: project root directory, equivalent to `--omnidist-root`.
206
+ - `NPM_PUBLISH_TOKEN`: npm token for `distributions.npm.publish-auth: token`.
207
+ - `UV_PUBLISH_TOKEN`: uv publish token when `--token` is not provided.
333
208
 
334
- - `omnidist init`
335
- - `omnidist build`
336
- - `omnidist quickstart`
337
- - `omnidist version`
338
- - `omnidist ci [--force]`
339
- - `omnidist stage [--dev] [--only npm|uv|npm,uv]`
340
- - `omnidist verify [--only npm|uv|npm,uv]`
341
- - `omnidist publish [--dry-run] [--only npm|uv|npm,uv]`
342
- - `omnidist npm`
343
- - `omnidist uv`
209
+ Build `ldflags` template variables:
344
210
 
345
- Global flags:
211
+ - `OMNIDIST_VERSION`: expanded in `build.ldflags` during `omnidist build`.
212
+ - `OMNIDIST_GIT_COMMIT`: populated by `omnidist build` when git metadata is available.
213
+ - `OMNIDIST_BUILD_DATE`: populated by `omnidist build` as UTC RFC3339.
346
214
 
347
- - `--config <path>`
348
- - `--profile <name>`
349
- - `--omnidist-root <path>`
215
+ Example:
350
216
 
351
- NPM subcommands:
217
+ ```yaml
218
+ build:
219
+ ldflags: >-
220
+ -s -w
221
+ -X github.com/your-org/mytool/internal/version.version=${OMNIDIST_VERSION}
222
+ -X github.com/your-org/mytool/internal/version.gitCommit=${OMNIDIST_GIT_COMMIT}
223
+ -X github.com/your-org/mytool/internal/version.buildDate=${OMNIDIST_BUILD_DATE}
224
+ ```
352
225
 
353
- - `omnidist npm stage [--dev]`
354
- - `omnidist npm verify`
355
- - `omnidist npm publish [--dry-run] [--tag <tag>] [--registry <url>] [--otp <code>]`
226
+ `build.ldflags` uses `os.ExpandEnv`, so both `$VAR` and `${VAR}` are supported.
227
+ Unset variables expand to empty strings.
356
228
 
357
- UV subcommands:
229
+ ## npm Distribution
358
230
 
359
- - `omnidist uv stage [--dev]`
360
- - `omnidist uv verify`
361
- - `omnidist uv publish [--dry-run] [--publish-url <url>] [--token <pypi-token>]`
231
+ The npm distribution has two package types:
362
232
 
363
- ## Usage Patterns
233
+ - Meta package: `distributions.npm.package`, with a small Node shim.
234
+ - Platform packages: one package per target, selected by npm `os` and `cpu` constraints.
364
235
 
365
- ### Local development loop
236
+ The meta package lists platform packages as `optionalDependencies` at the same
237
+ version. Published packages do not use `postinstall` scripts or network
238
+ downloaders.
366
239
 
367
- Use this when iterating on the CLI binary and validating artifact generation locally:
240
+ Common npm commands:
368
241
 
369
242
  ```bash
370
- omnidist build
371
- omnidist stage
372
- omnidist verify
243
+ omnidist npm stage
244
+ omnidist npm verify
245
+ omnidist npm publish --tag latest
373
246
  ```
374
247
 
375
- ### Dev pre-release artifacts
248
+ Token publishing uses `NPM_PUBLISH_TOKEN`. `omnidist` writes a workspace
249
+ `.omnidist/.npmrc` from `distributions.npm.registry` with npm's token
250
+ substitution syntax.
376
251
 
377
- Generate prerelease versions from git describe data:
252
+ Trusted publishing uses npm OIDC instead of `NPM_PUBLISH_TOKEN`:
378
253
 
379
- ```bash
380
- omnidist stage --dev
254
+ ```yaml
255
+ distributions:
256
+ npm:
257
+ publish-auth: trusted
258
+ repository-url: git+https://github.com/your-org/your-repo.git
381
259
  ```
382
260
 
383
- ### Unified multi-distribution orchestration
261
+ In trusted mode:
384
262
 
385
- Top-level `stage`, `verify`, and `publish` run distributions in deterministic order:
386
- `npm` first, then `uv`, and stop on first failure.
263
+ - `repository-url` is required and is written to staged package metadata.
264
+ - `omnidist npm publish` skips token-only auth preflight.
265
+ - GitHub Actions must grant `id-token: write`.
266
+ - Each npm package, including platform packages, needs a trusted publisher configured on npm.
387
267
 
388
- Select a subset with `--only`:
268
+ Print trusted publisher setup commands:
389
269
 
390
270
  ```bash
391
- omnidist stage --only uv
392
- omnidist verify --only npm
393
- omnidist publish --dry-run --only npm,uv
271
+ omnidist npm trust
394
272
  ```
395
273
 
396
- ### CI bootstrap for tag releases
397
-
398
- Generate `.github/workflows/omnidist-release.yml`:
274
+ Apply them directly:
399
275
 
400
276
  ```bash
401
- omnidist ci
277
+ omnidist npm trust --apply
402
278
  ```
403
279
 
404
- The generated workflow triggers on `v*` tag pushes and runs:
405
- `build -> stage -> verify -> publish`, then publishes the built binaries and
406
- checksums to the GitHub release.
280
+ Useful trust options:
281
+
282
+ - `--workflow-file <name>` for a workflow filename other than `omnidist-release.yml`.
283
+ - `--repo <owner/repo>` to override `distributions.npm.repository-url`.
284
+ - `--environment <name>` for npm trusted publishers restricted to a GitHub Actions environment.
285
+ - `--allow-stage-publish` to allow npm stage publish.
286
+
287
+ ## uv Distribution
288
+
289
+ The uv distribution stages wheel artifacts under `.omnidist/<profile>/uv/dist`.
290
+ During staging, versions are converted to PEP 440 where needed.
407
291
 
408
- If workflow already exists:
292
+ Common uv commands:
409
293
 
410
294
  ```bash
411
- omnidist ci --force
295
+ omnidist uv stage
296
+ omnidist uv verify
297
+ omnidist uv publish
412
298
  ```
413
299
 
414
- ### npm publishing flow with custom options
300
+ Publish to a different PyPI-compatible index:
415
301
 
416
302
  ```bash
417
- omnidist npm publish --dry-run --tag next --registry https://registry.npmjs.org
303
+ omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <token>
418
304
  ```
419
305
 
420
- Before npm commands run, omnidist writes `.omnidist/.npmrc` from `distributions.npm.registry` using:
421
- `//<registry>/:_authToken=${NPM_PUBLISH_TOKEN}`.
422
- If staged package version contains a `-dev` prerelease and `--tag` is not provided, omnidist auto-publishes with `--tag dev`.
306
+ `omnidist uv verify` rejects versions with local metadata (`+...`) for
307
+ PyPI/TestPyPI publishing, because those indexes reject local versions.
423
308
 
424
- To publish through npm trusted publishing, set:
309
+ ## README and License Staging
425
310
 
426
- ```yaml
427
- distributions:
428
- npm:
429
- publish-auth: trusted
430
- repository-url: git+https://github.com/your-org/your-repo.git
311
+ README source precedence during staging:
312
+
313
+ ```text
314
+ distributions.<name>.readme-path -> readme-path -> README.md
431
315
  ```
432
316
 
433
- In trusted mode, omnidist skips token-only auth preflight and does not force a workspace `.npmrc`; `npm publish` uses the ambient CI credentials instead. For GitHub Actions, that means:
434
- - the workflow must grant `id-token: write`
435
- - the job must use a supported Node/npm toolchain for OIDC
436
- - each published npm package must have its own trusted publisher configured on npm
437
- - each staged package must include a `repository.url` that exactly matches the GitHub repository
317
+ If a configured `readme-path` is set and cannot be read, staging fails. Set
318
+ `include-readme: false` for a distribution to skip README inclusion.
319
+
320
+ For npm packages, `license` can be set explicitly under `distributions.npm`.
321
+ When it is omitted, omnidist includes the project license file when present and
322
+ writes package metadata that points to that file.
438
323
 
439
- `omnidist ci` emits the required GitHub Actions OIDC permissions and Node setup when `publish-auth: trusted` is configured.
324
+ ## CI Releases
440
325
 
441
- To configure npm trusted publishers for the meta package and all platform packages:
326
+ Generate a release workflow:
442
327
 
443
328
  ```bash
444
- omnidist npm trust
329
+ omnidist ci
445
330
  ```
446
331
 
447
- That prints the exact `npx -y npm@11.16.0 trust github ...` commands derived from your config and target matrix, so you do not have to rely on the host npm version. To apply them directly with an npm account that has write access and 2FA enabled:
332
+ Overwrite an existing generated workflow:
448
333
 
449
334
  ```bash
450
- omnidist npm trust --apply
335
+ omnidist ci --force
451
336
  ```
452
337
 
453
- Useful overrides:
454
- - `--workflow-file publish.yml` when your workflow filename differs from `omnidist-release.yml`
455
- - `--repo your-org/your-repo` when you want to override `distributions.npm.repository-url`
456
- - `--environment production` when your trusted publisher is restricted to a GitHub Actions environment
457
- - `--allow-stage-publish` to also allow `npm stage publish`
338
+ The workflow installs omnidist with npm. When generating this repository's own
339
+ release workflow, it uses `go run ./cmd/omnidist` instead. The workflow also
340
+ sets `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` for JavaScript-based GitHub
341
+ Actions.
458
342
 
459
- If your npm account requires 2FA for publish operations:
343
+ Before the first tag release, configure the required registry credentials:
460
344
 
461
- ```bash
462
- omnidist npm publish --otp <6-digit-code>
463
- ```
345
+ - npm token mode: `NPM_PUBLISH_TOKEN` GitHub secret.
346
+ - npm trusted mode: npm trusted publishers for every staged npm package.
347
+ - uv publishing: `UV_PUBLISH_TOKEN` GitHub secret.
464
348
 
465
- ### uv publishing flow with custom index/auth
349
+ Release by pushing a SemVer tag:
466
350
 
467
351
  ```bash
468
- omnidist uv publish --publish-url https://upload.pypi.org/legacy/ --token <pypi-token>
352
+ git tag v1.2.3
353
+ git push origin v1.2.3
469
354
  ```
470
355
 
471
- `omnidist uv publish` uses token authentication.
472
- Provide token via `--token` or `UV_PUBLISH_TOKEN` (required for non-dry-run).
473
- `omnidist uv verify` and `omnidist uv publish` use the staged version from
474
- `.omnidist/uv/pyproject.toml` when present.
475
- For PyPI/TestPyPI, `omnidist uv verify` fails if the staged version contains local metadata (`+...`), since those indexes reject local versions.
356
+ ## Command Reference
476
357
 
477
- TestPyPI dry-run style validation:
358
+ Top-level commands:
478
359
 
479
360
  ```bash
480
- omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/
361
+ omnidist init
362
+ omnidist quickstart
363
+ omnidist build
364
+ omnidist stage [--dev] [--only npm|uv|npm,uv]
365
+ omnidist verify [--only npm|uv|npm,uv]
366
+ omnidist publish [--dry-run] [--only npm|uv|npm,uv]
367
+ omnidist ci [--force] [--dry-run]
368
+ omnidist version
481
369
  ```
482
370
 
483
- ## Usage Examples
371
+ Global flags:
484
372
 
485
- ### npm release path
373
+ ```bash
374
+ --config <path>
375
+ --profile <name>
376
+ --omnidist-root <path>
377
+ ```
378
+
379
+ npm commands:
486
380
 
487
381
  ```bash
488
- git tag v1.2.0
489
- omnidist build
490
- omnidist npm stage
382
+ omnidist npm stage [--dev]
491
383
  omnidist npm verify
492
- omnidist npm publish
384
+ omnidist npm publish [--dry-run] [--tag <tag>] [--registry <url>] [--otp <code>]
385
+ omnidist npm trust [--apply] [--workflow-file <name>] [--repo <owner/repo>] [--environment <name>] [--allow-stage-publish]
493
386
  ```
494
387
 
495
- ### uv release path
388
+ uv commands:
496
389
 
497
390
  ```bash
498
- git tag v1.2.0
499
- omnidist build
500
- omnidist uv stage
391
+ omnidist uv stage [--dev]
501
392
  omnidist uv verify
502
- omnidist uv publish --publish-url https://upload.pypi.org/legacy/
393
+ omnidist uv publish [--dry-run] [--publish-url <url>] [--token <token>]
503
394
  ```
504
395
 
505
- ### uv dry-run publish
396
+ Top-level `stage`, `verify`, and `publish` run distributions in deterministic
397
+ order: npm first, then uv. Use `--only` to limit the command to one or more
398
+ distributions.
506
399
 
507
- ```bash
508
- omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/
509
- ```
400
+ ## Troubleshooting
510
401
 
511
- ### version from environment
402
+ `omnidist build` says no version could be resolved:
512
403
 
513
- ```yaml
514
- version:
515
- source: env
516
- ```
404
+ Check `version.source`. For `git-tag`, `HEAD` must be exactly on a SemVer tag.
405
+ For `env`, set `OMNIDIST_VERSION`. For `file`, create the configured version
406
+ file.
517
407
 
518
- ```bash
519
- export OMNIDIST_VERSION=2.0.0
520
- omnidist npm stage
521
- omnidist uv stage
522
- ```
408
+ `omnidist stage` says the build version file is missing:
409
+
410
+ Run `omnidist build` first. Stage commands use the build version persisted under
411
+ `.omnidist/<profile>/dist/VERSION`.
412
+
413
+ npm install cannot find a platform package:
414
+
415
+ Run `omnidist npm verify` before publishing. It checks package versions,
416
+ platform `os` and `cpu` fields, required binaries, forbidden `postinstall`
417
+ scripts, repository metadata, and optional dependency parity.
418
+
419
+ Trusted npm publish fails:
420
+
421
+ Verify that `distributions.npm.repository-url` matches the GitHub repository,
422
+ the workflow grants `id-token: write`, and every npm package has a trusted
423
+ publisher configured.
424
+
425
+ uv publish rejects the version:
426
+
427
+ Restage with a publishable version. PyPI and TestPyPI reject local version
428
+ metadata containing `+`.
429
+
430
+ ## Contributing
431
+
432
+ For repository layout, development workflow, package model details, and migration
433
+ notes, see [CONTRIBUTING.md](CONTRIBUTING.md).
package/bin/omnidist CHANGED
Binary file
package/package.json CHANGED
@@ -20,5 +20,5 @@
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/metalagman/omnidist.git"
22
22
  },
23
- "version": "0.1.29"
23
+ "version": "0.1.30"
24
24
  }