@omnidist/omnidist-linux-arm64 0.1.25 → 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 +256 -306
  2. package/bin/omnidist +0 -0
  3. package/package.json +5 -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 (unless `--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,420 +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:
81
+ At minimum, check these fields:
96
82
 
97
- ```bash
98
- omnidist build
99
- ```
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`.
100
88
 
101
- This also writes the resolved build version to `.omnidist/<profile>/dist/VERSION`
102
- (`.omnidist/default/dist/VERSION` with init defaults).
103
-
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 when not using `--dry-run`
179
- - `UV_PUBLISH_TOKEN`: used by uv publish when `--token` is not provided
180
-
181
- Example `.env`:
182
-
183
- ```dotenv
184
- OMNIDIST_VERSION=1.2.3
185
- OMNIDIST_PROFILE=release
186
- NPM_PUBLISH_TOKEN=npm_xxx
187
- UV_PUBLISH_TOKEN=pypi-xxx
188
- ```
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.
189
113
 
190
114
  ## Configuration
191
115
 
192
- `.omnidist/omnidist.yaml`:
193
-
194
- `omnidist init` now generates the profiles-mode shape (`profiles.default`) by default.
195
- Legacy top-level format remains supported when loading config files.
196
-
197
- ```yaml
198
- tool:
199
- name: omnidist
200
- main: ./cmd/omnidist
201
-
202
- version:
203
- source: git-tag # git-tag | file | env | fixed
204
- file: VERSION # optional; used when source is file (default VERSION)
205
- fixed: 1.2.3 # required when source is fixed
206
-
207
- readme-path: docs/README.md # optional shared README source for staging
208
-
209
- targets:
210
- - os: darwin
211
- arch: amd64
212
- - os: darwin
213
- arch: arm64
214
- - os: linux
215
- arch: amd64
216
- - os: linux
217
- arch: arm64
218
- - os: windows
219
- arch: amd64
220
-
221
- build:
222
- ldflags: -s -w
223
- tags: []
224
- cgo: false
225
-
226
- distributions:
227
- npm:
228
- package: "@omnidist/omnidist"
229
- registry: https://registry.npmjs.org
230
- access: public # public | restricted
231
- license: MIT # optional override for package.json license; omit to use SEE LICENSE IN <file>
232
- keywords: [cli, ai, llm] # optional npm meta-package keywords
233
- readme-path: docs/npm-readme.md # optional npm-specific README source
234
- include-readme: true # include project README.md in staged packages when present
235
-
236
- uv:
237
- package: omnidist
238
- index-url: https://upload.pypi.org/legacy/
239
- linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
240
- readme-path: docs/uv-readme.md # optional uv-specific README source
241
- include-readme: true # include project README.md in staged wheels when present
242
- ```
243
-
244
- Profiles mode:
116
+ `omnidist init` writes profiles-mode config by default:
245
117
 
246
118
  ```yaml
247
119
  profiles:
248
120
  default:
249
121
  tool:
250
- name: omnidist
251
- main: ./cmd/omnidist
122
+ name: mytool
123
+ main: ./cmd/mytool
124
+
252
125
  version:
253
- source: env
254
- 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
+
255
130
  targets:
131
+ - os: darwin
132
+ arch: amd64
133
+ - os: darwin
134
+ arch: arm64
135
+ - os: linux
136
+ arch: amd64
256
137
  - os: linux
138
+ arch: arm64
139
+ - os: windows
257
140
  arch: amd64
141
+
258
142
  build:
259
143
  ldflags: -s -w
260
144
  tags: []
261
145
  cgo: false
146
+
262
147
  distributions:
263
148
  npm:
264
- package: "@scope/mytool"
265
- keywords: [cli, ai, llm]
266
- 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
+
267
155
  uv:
268
156
  package: mytool
269
- readme-path: docs/uv-readme.md
157
+ index-url: https://upload.pypi.org/legacy/
158
+ linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
159
+ include-readme: true
160
+ ```
270
161
 
271
- release:
272
- tool:
273
- name: omnidist
274
- main: ./cmd/omnidist
275
- version:
276
- source: fixed
277
- fixed: 1.0.0
278
- targets:
279
- - os: linux
280
- arch: amd64
281
- build:
282
- ldflags: -s -w
283
- tags: []
284
- cgo: false
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>/`.
165
+
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.
168
+
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`.
172
+
173
+ ## Versioning
174
+
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.
178
+
179
+ Supported version sources:
180
+
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`.
185
+
186
+ For local prerelease staging, use:
187
+
188
+ ```bash
189
+ omnidist stage --dev
285
190
  ```
286
191
 
287
- Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`.
288
- If `profiles` is present and no profile is provided, `default` is used.
289
- Mixing top-level runtime fields and `profiles` in the same file is not supported.
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.
290
195
 
291
- `targets` use Go values (`GOOS`/`GOARCH`). Distribution workflows map them as needed (for example `windows/amd64` -> npm `win32/x64`).
196
+ ## Environment and Build Variables
292
197
 
293
- README source precedence during staging:
294
- `distributions.<name>.readme-path` -> `readme-path` -> `README.md`.
295
- If a configured readme-path is set and cannot be read, staging fails.
198
+ `omnidist` loads `.env` at startup when the file exists.
199
+
200
+ Environment variables:
201
+
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.
296
208
 
297
- When `distributions.npm.keywords` is set, omnidist writes those values to the staged npm meta package `package.json`.
209
+ Build `ldflags` template variables:
298
210
 
299
- For appkit version injection, configure `build.ldflags` in your project config:
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.
214
+
215
+ Example:
300
216
 
301
217
  ```yaml
302
218
  build:
303
- 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}
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}
304
224
  ```
305
225
 
306
- `build.ldflags` values are expanded with `os.ExpandEnv` during `omnidist build`.
307
- Both `${VAR}` and `$VAR` are supported; unset vars expand to empty strings.
226
+ `build.ldflags` uses `os.ExpandEnv`, so both `$VAR` and `${VAR}` are supported.
227
+ Unset variables expand to empty strings.
308
228
 
309
- With `version.source: git-tag`, release workflows require `HEAD` to be on an exact SemVer tag (`vX.Y.Z` or `X.Y.Z`).
229
+ ## npm Distribution
310
230
 
311
- With `version.source: file`, omnidist reads `./VERSION` from the repository root.
231
+ The npm distribution has two package types:
312
232
 
313
- With `version.source: file`, you can override the path via `version.file` (for example `versions/release.txt`).
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.
314
235
 
315
- With `version.source: fixed`, set `version.fixed` to an exact value in config (for example `1.2.3`).
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.
316
239
 
317
- With `version.source: env`, set `OMNIDIST_VERSION` (for example in `.env`) before build/stage/publish.
240
+ Common npm commands:
318
241
 
319
- 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.
242
+ ```bash
243
+ omnidist npm stage
244
+ omnidist npm verify
245
+ omnidist npm publish --tag latest
246
+ ```
320
247
 
321
- Workspace behavior:
322
- - Legacy config writes artifacts to `.omnidist/*`.
323
- - Profiles config writes artifacts to `.omnidist/<profile>/*`.
324
- - 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.
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.
325
251
 
326
- ## Command Reference
252
+ Trusted publishing uses npm OIDC instead of `NPM_PUBLISH_TOKEN`:
327
253
 
328
- Top-level:
254
+ ```yaml
255
+ distributions:
256
+ npm:
257
+ publish-auth: trusted
258
+ repository-url: git+https://github.com/your-org/your-repo.git
259
+ ```
329
260
 
330
- - `omnidist init`
331
- - `omnidist build`
332
- - `omnidist quickstart`
333
- - `omnidist version`
334
- - `omnidist ci [--force]`
335
- - `omnidist stage [--dev] [--only npm|uv|npm,uv]`
336
- - `omnidist verify [--only npm|uv|npm,uv]`
337
- - `omnidist publish [--dry-run] [--only npm|uv|npm,uv]`
338
- - `omnidist npm`
339
- - `omnidist uv`
261
+ In trusted mode:
340
262
 
341
- Global flags:
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.
342
267
 
343
- - `--config <path>`
344
- - `--profile <name>`
345
- - `--omnidist-root <path>`
268
+ Print trusted publisher setup commands:
346
269
 
347
- NPM subcommands:
270
+ ```bash
271
+ omnidist npm trust
272
+ ```
348
273
 
349
- - `omnidist npm stage [--dev]`
350
- - `omnidist npm verify`
351
- - `omnidist npm publish [--dry-run] [--tag <tag>] [--registry <url>] [--otp <code>]`
274
+ Apply them directly:
275
+
276
+ ```bash
277
+ omnidist npm trust --apply
278
+ ```
352
279
 
353
- UV subcommands:
280
+ Useful trust options:
354
281
 
355
- - `omnidist uv stage [--dev]`
356
- - `omnidist uv verify`
357
- - `omnidist uv publish [--dry-run] [--publish-url <url>] [--token <pypi-token>]`
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.
358
286
 
359
- ## Usage Patterns
287
+ ## uv Distribution
360
288
 
361
- ### Local development loop
289
+ The uv distribution stages wheel artifacts under `.omnidist/<profile>/uv/dist`.
290
+ During staging, versions are converted to PEP 440 where needed.
362
291
 
363
- Use this when iterating on the CLI binary and validating artifact generation locally:
292
+ Common uv commands:
364
293
 
365
294
  ```bash
366
- omnidist build
367
- omnidist stage
368
- omnidist verify
295
+ omnidist uv stage
296
+ omnidist uv verify
297
+ omnidist uv publish
369
298
  ```
370
299
 
371
- ### Dev pre-release artifacts
372
-
373
- Generate prerelease versions from git describe data:
300
+ Publish to a different PyPI-compatible index:
374
301
 
375
302
  ```bash
376
- omnidist stage --dev
303
+ omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <token>
377
304
  ```
378
305
 
379
- ### Unified multi-distribution orchestration
306
+ `omnidist uv verify` rejects versions with local metadata (`+...`) for
307
+ PyPI/TestPyPI publishing, because those indexes reject local versions.
380
308
 
381
- Top-level `stage`, `verify`, and `publish` run distributions in deterministic order:
382
- `npm` first, then `uv`, and stop on first failure.
309
+ ## README and License Staging
383
310
 
384
- Select a subset with `--only`:
311
+ README source precedence during staging:
385
312
 
386
- ```bash
387
- omnidist stage --only uv
388
- omnidist verify --only npm
389
- omnidist publish --dry-run --only npm,uv
313
+ ```text
314
+ distributions.<name>.readme-path -> readme-path -> README.md
390
315
  ```
391
316
 
392
- ### CI bootstrap for tag releases
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.
323
+
324
+ ## CI Releases
393
325
 
394
- Generate `.github/workflows/omnidist-release.yml`:
326
+ Generate a release workflow:
395
327
 
396
328
  ```bash
397
329
  omnidist ci
398
330
  ```
399
331
 
400
- The generated workflow triggers on `v*` tag pushes and runs:
401
- `build -> stage -> verify -> publish`, then publishes the built binaries and
402
- checksums to the GitHub release.
403
-
404
- If workflow already exists:
332
+ Overwrite an existing generated workflow:
405
333
 
406
334
  ```bash
407
335
  omnidist ci --force
408
336
  ```
409
337
 
410
- ### npm publishing flow with custom options
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.
411
342
 
412
- ```bash
413
- omnidist npm publish --dry-run --tag next --registry https://registry.npmjs.org
414
- ```
343
+ Before the first tag release, configure the required registry credentials:
415
344
 
416
- Before npm commands run, omnidist writes `.omnidist/.npmrc` from `distributions.npm.registry` using:
417
- `//<registry>/:_authToken=${NPM_PUBLISH_TOKEN}`.
418
- If staged package version contains a `-dev` prerelease and `--tag` is not provided, omnidist auto-publishes with `--tag dev`.
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.
419
348
 
420
- If your npm account requires 2FA for publish operations:
349
+ Release by pushing a SemVer tag:
421
350
 
422
351
  ```bash
423
- omnidist npm publish --otp <6-digit-code>
352
+ git tag v1.2.3
353
+ git push origin v1.2.3
424
354
  ```
425
355
 
426
- ### uv publishing flow with custom index/auth
356
+ ## Command Reference
357
+
358
+ Top-level commands:
427
359
 
428
360
  ```bash
429
- omnidist uv publish --publish-url https://upload.pypi.org/legacy/ --token <pypi-token>
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
430
369
  ```
431
370
 
432
- `omnidist uv publish` uses token authentication.
433
- Provide token via `--token` or `UV_PUBLISH_TOKEN` (required for non-dry-run).
434
- `omnidist uv verify` and `omnidist uv publish` use the staged version from
435
- `.omnidist/uv/pyproject.toml` when present.
436
- For PyPI/TestPyPI, `omnidist uv verify` fails if the staged version contains local metadata (`+...`), since those indexes reject local versions.
437
-
438
- TestPyPI dry-run style validation:
371
+ Global flags:
439
372
 
440
373
  ```bash
441
- omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/
374
+ --config <path>
375
+ --profile <name>
376
+ --omnidist-root <path>
442
377
  ```
443
378
 
444
- ## Usage Examples
445
-
446
- ### npm release path
379
+ npm commands:
447
380
 
448
381
  ```bash
449
- git tag v1.2.0
450
- omnidist build
451
- omnidist npm stage
382
+ omnidist npm stage [--dev]
452
383
  omnidist npm verify
453
- 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]
454
386
  ```
455
387
 
456
- ### uv release path
388
+ uv commands:
457
389
 
458
390
  ```bash
459
- git tag v1.2.0
460
- omnidist build
461
- omnidist uv stage
391
+ omnidist uv stage [--dev]
462
392
  omnidist uv verify
463
- omnidist uv publish --publish-url https://upload.pypi.org/legacy/
393
+ omnidist uv publish [--dry-run] [--publish-url <url>] [--token <token>]
464
394
  ```
465
395
 
466
- ### 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.
467
399
 
468
- ```bash
469
- omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/
470
- ```
400
+ ## Troubleshooting
471
401
 
472
- ### version from environment
402
+ `omnidist build` says no version could be resolved:
473
403
 
474
- ```yaml
475
- version:
476
- source: env
477
- ```
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.
478
407
 
479
- ```bash
480
- export OMNIDIST_VERSION=2.0.0
481
- omnidist npm stage
482
- omnidist uv stage
483
- ```
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
@@ -16,5 +16,9 @@
16
16
  "os": [
17
17
  "linux"
18
18
  ],
19
- "version": "0.1.25"
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/metalagman/omnidist.git"
22
+ },
23
+ "version": "0.1.30"
20
24
  }