omnidist 0.1.35-x86_64-linux
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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +503 -0
- data/exe/omnidist +4 -0
- data/lib/omnidist.rb +1 -0
- data/libexec/omnidist +0 -0
- data/omnidist.gemspec +21 -0
- metadata +47 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 41516d9f39f05a85117bb3b51cffbae3880ff6bbda78e224e587628e81cfe3c4
|
|
4
|
+
data.tar.gz: 68082f73c320130e41df9e2d5588535a4720391ad83501be4901d433cedd6f3e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: f4a97f8bf5aa0bb76e6390ae71a71a74cbaf8eeb26ed75730f1cdfdcbe7796a144b1e3e84d61660974678e011dfa342f1dd468a327f51236caa4e2257fc307a5
|
|
7
|
+
data.tar.gz: 4895aabc3134ee61633d27f23dfa0c2e952a66acd8098e908ebf22f92d856a3c2812f23117f56f72126b9e696161404c5cb75954198e69ea85d44a5eb6169821
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alexey Samoylov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
# omnidist
|
|
2
|
+
|
|
3
|
+
[](https://goreportcard.com/report/github.com/metalagman/omnidist)
|
|
4
|
+
[](https://github.com/metalagman/omnidist/actions/workflows/lint.yml)
|
|
5
|
+
[](https://github.com/metalagman/omnidist/actions/workflows/test.yml)
|
|
6
|
+
[](https://codecov.io/github/metalagman/omnidist)
|
|
7
|
+
[](https://github.com/metalagman/omnidist/releases)
|
|
8
|
+
[](https://www.npmjs.com/package/@omnidist/omnidist)
|
|
9
|
+
[](https://pypi.org/project/omnidist/)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
Package and publish a Go CLI as npm, uv, and RubyGems installable tools with prebuilt
|
|
13
|
+
cross-platform binaries.
|
|
14
|
+
|
|
15
|
+
`omnidist` gives Go CLI maintainers one repeatable release flow:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
build -> stage -> verify -> publish
|
|
19
|
+
```
|
|
20
|
+
|
|
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`. The RubyGems distribution stages platform-specific gems so
|
|
25
|
+
users can install the same CLI with `gem install`.
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- Go 1.25+
|
|
30
|
+
- Node.js and npm for npm staging, verification, and publishing
|
|
31
|
+
- `uv` for uv staging, verification, and publishing
|
|
32
|
+
- Ruby and RubyGems for gem staging, verification, and publishing
|
|
33
|
+
- `git` when `version.source: git-tag`
|
|
34
|
+
- `NPM_PUBLISH_TOKEN` for npm token publishing, unless using `--dry-run` or trusted publishing
|
|
35
|
+
- `UV_PUBLISH_TOKEN` or `omnidist uv publish --token` for uv publishing, unless using `--dry-run`
|
|
36
|
+
- `GEM_HOST_API_KEY` / `RUBYGEMS_API_KEY` for gem token publishing, unless using `--dry-run` or trusted publishing
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
Run without installing:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx -y @omnidist/omnidist@latest --help
|
|
44
|
+
uvx omnidist --help
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Install with npm:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm i -g @omnidist/omnidist
|
|
51
|
+
omnidist --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Install with Go:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
go install github.com/metalagman/omnidist/cmd/omnidist@latest
|
|
58
|
+
omnidist --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Install with RubyGems after publication:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
gem install omnidist
|
|
65
|
+
omnidist --help
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Run from a checkout:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
go run ./cmd/omnidist --help
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Quick Start
|
|
75
|
+
|
|
76
|
+
Initialize an existing Go CLI repository:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
omnidist init
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This creates `.omnidist/omnidist.yaml` and initial workspace directories under
|
|
83
|
+
`.omnidist/default/`. The generated config uses `profiles.default`.
|
|
84
|
+
|
|
85
|
+
Edit the generated config before building:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
$EDITOR .omnidist/omnidist.yaml
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
At minimum, check these fields:
|
|
92
|
+
|
|
93
|
+
- `tool.name`: the binary name users will run.
|
|
94
|
+
- `tool.main`: the Go main package, for example `./cmd/mytool`.
|
|
95
|
+
- `distributions.npm.package`: the npm package, for example `@my-org/mytool`.
|
|
96
|
+
- `distributions.uv.package`: the uv/PyPI package, for example `mytool`.
|
|
97
|
+
- `distributions.gem.package`: the RubyGems package, for example `mytool`.
|
|
98
|
+
- `version.source`: usually `git-tag`, `file`, `env`, or `fixed`.
|
|
99
|
+
|
|
100
|
+
Then run the local release pipeline:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
omnidist build
|
|
104
|
+
omnidist stage
|
|
105
|
+
omnidist verify
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Publish only after verification passes:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
omnidist publish
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Generate a GitHub Actions release workflow:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
omnidist ci
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The generated workflow is written to `.github/workflows/omnidist-release.yml`.
|
|
121
|
+
It runs on `v*` tag pushes, builds once, stages and verifies artifacts, publishes
|
|
122
|
+
npm, uv, and gem distributions, then uploads the built binaries and `checksums.txt`
|
|
123
|
+
to the GitHub release.
|
|
124
|
+
|
|
125
|
+
## Configuration
|
|
126
|
+
|
|
127
|
+
`omnidist init` writes profiles-mode config by default:
|
|
128
|
+
|
|
129
|
+
```yaml
|
|
130
|
+
profiles:
|
|
131
|
+
default:
|
|
132
|
+
tool:
|
|
133
|
+
name: mytool
|
|
134
|
+
main: ./cmd/mytool
|
|
135
|
+
|
|
136
|
+
version:
|
|
137
|
+
source: git-tag # git-tag | file | env | fixed
|
|
138
|
+
file: VERSION # used only when source is file
|
|
139
|
+
fixed: 1.2.3 # required only when source is fixed
|
|
140
|
+
|
|
141
|
+
targets:
|
|
142
|
+
- os: darwin
|
|
143
|
+
arch: amd64
|
|
144
|
+
- os: darwin
|
|
145
|
+
arch: arm64
|
|
146
|
+
- os: linux
|
|
147
|
+
arch: amd64
|
|
148
|
+
- os: linux
|
|
149
|
+
arch: arm64
|
|
150
|
+
- os: windows
|
|
151
|
+
arch: amd64
|
|
152
|
+
|
|
153
|
+
build:
|
|
154
|
+
ldflags: -s -w
|
|
155
|
+
tags: []
|
|
156
|
+
cgo: false
|
|
157
|
+
|
|
158
|
+
distributions:
|
|
159
|
+
npm:
|
|
160
|
+
package: "@my-org/mytool"
|
|
161
|
+
registry: https://registry.npmjs.org
|
|
162
|
+
access: public # public | restricted
|
|
163
|
+
publish-auth: token # token | trusted
|
|
164
|
+
include-readme: true
|
|
165
|
+
|
|
166
|
+
uv:
|
|
167
|
+
package: mytool
|
|
168
|
+
index-url: https://upload.pypi.org/legacy/
|
|
169
|
+
linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
|
|
170
|
+
include-readme: true
|
|
171
|
+
|
|
172
|
+
gem:
|
|
173
|
+
package: mytool
|
|
174
|
+
registry: https://rubygems.org
|
|
175
|
+
publish-auth: token # token | trusted
|
|
176
|
+
repository-url: https://github.com/my-org/mytool
|
|
177
|
+
include-readme: true
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`. If `profiles`
|
|
181
|
+
is present and no profile is selected, `default` is used. Profiles write
|
|
182
|
+
artifacts to `.omnidist/<profile>/`.
|
|
183
|
+
|
|
184
|
+
Legacy top-level config is still accepted when loading existing config files,
|
|
185
|
+
but do not mix top-level runtime fields with a `profiles` map in the same file.
|
|
186
|
+
|
|
187
|
+
Targets use Go values: `os` is `GOOS`, and `arch` is `GOARCH`. Distribution
|
|
188
|
+
workflows map them as needed, for example `windows/amd64` becomes npm
|
|
189
|
+
`win32/x64`. For RubyGems, `windows/amd64` defaults to `x64-mingw-ucrt`; set
|
|
190
|
+
`targets[].variant: mingw32` if you need `x64-mingw32`, or `targets[].variant: musl`
|
|
191
|
+
for Linux musl gem platforms.
|
|
192
|
+
|
|
193
|
+
## Versioning
|
|
194
|
+
|
|
195
|
+
`omnidist build` resolves the release version and writes it to
|
|
196
|
+
`.omnidist/<profile>/dist/VERSION`. Stage and publish commands use that build
|
|
197
|
+
version so npm, uv, and gem artifacts stay in sync.
|
|
198
|
+
|
|
199
|
+
Supported version sources:
|
|
200
|
+
|
|
201
|
+
- `git-tag`: `HEAD` must be on an exact SemVer tag, either `vX.Y.Z` or `X.Y.Z`.
|
|
202
|
+
- `file`: read the version from `version.file`, defaulting to `VERSION`.
|
|
203
|
+
- `env`: read `OMNIDIST_VERSION`.
|
|
204
|
+
- `fixed`: read `version.fixed`.
|
|
205
|
+
|
|
206
|
+
For local prerelease staging, use:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
omnidist stage --dev
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
`--dev` generates prerelease artifact versions from git metadata. For npm
|
|
213
|
+
publishing, `-dev` prerelease versions are automatically published with
|
|
214
|
+
`--tag dev` when no tag is supplied.
|
|
215
|
+
|
|
216
|
+
## Environment and Build Variables
|
|
217
|
+
|
|
218
|
+
`omnidist` loads `.env` at startup when the file exists.
|
|
219
|
+
|
|
220
|
+
Environment variables:
|
|
221
|
+
|
|
222
|
+
- `OMNIDIST_VERSION`: used only when `version.source: env`. `VERSION` is not used.
|
|
223
|
+
- `OMNIDIST_CONFIG`: config file path, equivalent to `--config`.
|
|
224
|
+
- `OMNIDIST_PROFILE`: config profile name, equivalent to `--profile`.
|
|
225
|
+
- `OMNIDIST_OMNIDIST_ROOT`: project root directory, equivalent to `--omnidist-root`.
|
|
226
|
+
- `NPM_PUBLISH_TOKEN`: npm token for `distributions.npm.publish-auth: token`.
|
|
227
|
+
- `UV_PUBLISH_TOKEN`: uv publish token when `--token` is not provided.
|
|
228
|
+
- `GEM_HOST_API_KEY`: RubyGems token for `distributions.gem.publish-auth: token`.
|
|
229
|
+
- `RUBYGEMS_API_KEY`: alternate RubyGems token env name.
|
|
230
|
+
- `GEM_HOST_OTP_CODE`: RubyGems MFA OTP for token-based publish.
|
|
231
|
+
|
|
232
|
+
Build `ldflags` template variables:
|
|
233
|
+
|
|
234
|
+
- `OMNIDIST_VERSION`: expanded in `build.ldflags` during `omnidist build`.
|
|
235
|
+
- `OMNIDIST_GIT_COMMIT`: populated by `omnidist build` when git metadata is available.
|
|
236
|
+
- `OMNIDIST_BUILD_DATE`: populated by `omnidist build` as UTC RFC3339.
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
|
|
240
|
+
```yaml
|
|
241
|
+
build:
|
|
242
|
+
ldflags: >-
|
|
243
|
+
-s -w
|
|
244
|
+
-X github.com/your-org/mytool/internal/version.version=${OMNIDIST_VERSION}
|
|
245
|
+
-X github.com/your-org/mytool/internal/version.gitCommit=${OMNIDIST_GIT_COMMIT}
|
|
246
|
+
-X github.com/your-org/mytool/internal/version.buildDate=${OMNIDIST_BUILD_DATE}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`build.ldflags` uses `os.ExpandEnv`, so both `$VAR` and `${VAR}` are supported.
|
|
250
|
+
Unset variables expand to empty strings.
|
|
251
|
+
|
|
252
|
+
## npm Distribution
|
|
253
|
+
|
|
254
|
+
The npm distribution has two package types:
|
|
255
|
+
|
|
256
|
+
- Meta package: `distributions.npm.package`, with a small Node shim.
|
|
257
|
+
- Platform packages: one package per target, selected by npm `os` and `cpu` constraints.
|
|
258
|
+
|
|
259
|
+
The meta package lists platform packages as `optionalDependencies` at the same
|
|
260
|
+
version. Published packages do not use `postinstall` scripts or network
|
|
261
|
+
downloaders.
|
|
262
|
+
|
|
263
|
+
Common npm commands:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
omnidist npm stage
|
|
267
|
+
omnidist npm verify
|
|
268
|
+
omnidist npm publish --tag latest
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Token publishing uses `NPM_PUBLISH_TOKEN`. `omnidist` writes a workspace
|
|
272
|
+
`.omnidist/.npmrc` from `distributions.npm.registry` with npm's token
|
|
273
|
+
substitution syntax.
|
|
274
|
+
|
|
275
|
+
Trusted publishing uses npm OIDC instead of `NPM_PUBLISH_TOKEN`:
|
|
276
|
+
|
|
277
|
+
```yaml
|
|
278
|
+
distributions:
|
|
279
|
+
npm:
|
|
280
|
+
publish-auth: trusted
|
|
281
|
+
repository-url: git+https://github.com/your-org/your-repo.git
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
In trusted mode:
|
|
285
|
+
|
|
286
|
+
- `repository-url` is required and is written to staged package metadata.
|
|
287
|
+
- `omnidist npm publish` skips token-only auth preflight.
|
|
288
|
+
- GitHub Actions must grant `id-token: write`.
|
|
289
|
+
- Each npm package, including platform packages, needs a trusted publisher configured on npm.
|
|
290
|
+
|
|
291
|
+
Print trusted publisher setup commands:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
omnidist npm trust
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Apply them directly:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
omnidist npm trust --apply
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Useful trust options:
|
|
304
|
+
|
|
305
|
+
- `--workflow-file <name>` for a workflow filename other than `omnidist-release.yml`.
|
|
306
|
+
- `--repo <owner/repo>` to override `distributions.npm.repository-url`.
|
|
307
|
+
- `--environment <name>` for npm trusted publishers restricted to a GitHub Actions environment.
|
|
308
|
+
- `--allow-stage-publish` to allow npm stage publish.
|
|
309
|
+
|
|
310
|
+
## uv Distribution
|
|
311
|
+
|
|
312
|
+
The uv distribution stages wheel artifacts under `.omnidist/<profile>/uv/dist`.
|
|
313
|
+
During staging, versions are converted to PEP 440 where needed.
|
|
314
|
+
|
|
315
|
+
Common uv commands:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
omnidist uv stage
|
|
319
|
+
omnidist uv verify
|
|
320
|
+
omnidist uv publish
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Publish to a different PyPI-compatible index:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <token>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
`omnidist uv verify` rejects versions with local metadata (`+...`) for
|
|
330
|
+
PyPI/TestPyPI publishing, because those indexes reject local versions.
|
|
331
|
+
|
|
332
|
+
## RubyGems Distribution
|
|
333
|
+
|
|
334
|
+
The RubyGems distribution stages one platform-specific `.gem` per configured
|
|
335
|
+
target under `.omnidist/<profile>/gem/pkg`. Each gem contains:
|
|
336
|
+
|
|
337
|
+
- a wrapper executable under `exe/`
|
|
338
|
+
- the prebuilt CLI binary under `libexec/`
|
|
339
|
+
- platform metadata so RubyGems installs the matching package
|
|
340
|
+
|
|
341
|
+
Common gem commands:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
omnidist gem stage
|
|
345
|
+
omnidist gem verify
|
|
346
|
+
omnidist gem publish
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Token publishing uses `GEM_HOST_API_KEY` or `RUBYGEMS_API_KEY`. If your
|
|
350
|
+
RubyGems account requires MFA for pushes, also pass `--otp` or set
|
|
351
|
+
`GEM_HOST_OTP_CODE`.
|
|
352
|
+
|
|
353
|
+
Trusted publishing uses RubyGems OIDC instead of static secrets:
|
|
354
|
+
|
|
355
|
+
```yaml
|
|
356
|
+
distributions:
|
|
357
|
+
gem:
|
|
358
|
+
publish-auth: trusted
|
|
359
|
+
registry: https://rubygems.org
|
|
360
|
+
repository-url: https://github.com/your-org/your-repo
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
In trusted mode:
|
|
364
|
+
|
|
365
|
+
- GitHub Actions must grant `id-token: write`.
|
|
366
|
+
- The repository/workflow must be registered as a trusted publisher on RubyGems.org.
|
|
367
|
+
- `omnidist` can publish a brand-new gem name once the pending trusted publisher is configured on RubyGems.org.
|
|
368
|
+
|
|
369
|
+
## README and License Staging
|
|
370
|
+
|
|
371
|
+
README source precedence during staging:
|
|
372
|
+
|
|
373
|
+
```text
|
|
374
|
+
distributions.<name>.readme-path -> readme-path -> README.md
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
If a configured `readme-path` is set and cannot be read, staging fails. Set
|
|
378
|
+
`include-readme: false` for a distribution to skip README inclusion.
|
|
379
|
+
|
|
380
|
+
For npm packages, `license` can be set explicitly under `distributions.npm`.
|
|
381
|
+
When it is omitted, omnidist includes the project license file when present and
|
|
382
|
+
writes package metadata that points to that file.
|
|
383
|
+
|
|
384
|
+
## CI Releases
|
|
385
|
+
|
|
386
|
+
Generate a release workflow:
|
|
387
|
+
|
|
388
|
+
```bash
|
|
389
|
+
omnidist ci
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Overwrite an existing generated workflow:
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
omnidist ci --force
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
The workflow installs omnidist with npm. When generating this repository's own
|
|
399
|
+
release workflow, it uses `go run ./cmd/omnidist` instead. The workflow also
|
|
400
|
+
sets `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` for JavaScript-based GitHub
|
|
401
|
+
Actions.
|
|
402
|
+
|
|
403
|
+
Before the first tag release, configure the required registry credentials:
|
|
404
|
+
|
|
405
|
+
- npm token mode: `NPM_PUBLISH_TOKEN` GitHub secret.
|
|
406
|
+
- npm trusted mode: npm trusted publishers for every staged npm package.
|
|
407
|
+
- uv publishing: `UV_PUBLISH_TOKEN` GitHub secret.
|
|
408
|
+
- gem token mode: `RUBYGEMS_API_KEY` GitHub secret, and optionally `RUBYGEMS_OTP_CODE`.
|
|
409
|
+
- gem trusted mode: RubyGems trusted publisher for the release workflow.
|
|
410
|
+
|
|
411
|
+
Release by pushing a SemVer tag:
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
git tag v1.2.3
|
|
415
|
+
git push origin v1.2.3
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
## Command Reference
|
|
419
|
+
|
|
420
|
+
Top-level commands:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
omnidist init
|
|
424
|
+
omnidist quickstart
|
|
425
|
+
omnidist build
|
|
426
|
+
omnidist stage [--dev] [--only npm|uv|gem|npm,uv,gem]
|
|
427
|
+
omnidist verify [--only npm|uv|gem|npm,uv,gem]
|
|
428
|
+
omnidist publish [--dry-run] [--only npm|uv|gem|npm,uv,gem]
|
|
429
|
+
omnidist ci [--force] [--dry-run]
|
|
430
|
+
omnidist version
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Global flags:
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
--config <path>
|
|
437
|
+
--profile <name>
|
|
438
|
+
--omnidist-root <path>
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
npm commands:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
omnidist npm stage [--dev]
|
|
445
|
+
omnidist npm verify
|
|
446
|
+
omnidist npm publish [--dry-run] [--tag <tag>] [--registry <url>] [--otp <code>]
|
|
447
|
+
omnidist npm trust [--apply] [--workflow-file <name>] [--repo <owner/repo>] [--environment <name>] [--allow-stage-publish]
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
uv commands:
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
omnidist uv stage [--dev]
|
|
454
|
+
omnidist uv verify
|
|
455
|
+
omnidist uv publish [--dry-run] [--publish-url <url>] [--token <token>]
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
gem commands:
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
omnidist gem stage [--dev]
|
|
462
|
+
omnidist gem verify
|
|
463
|
+
omnidist gem publish [--dry-run] [--host <url>] [--api-key <token>] [--otp <code>]
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Top-level `stage`, `verify`, and `publish` run distributions in deterministic
|
|
467
|
+
order: npm first, then uv, then gem. Use `--only` to limit the command to one
|
|
468
|
+
or more distributions.
|
|
469
|
+
|
|
470
|
+
## Troubleshooting
|
|
471
|
+
|
|
472
|
+
`omnidist build` says no version could be resolved:
|
|
473
|
+
|
|
474
|
+
Check `version.source`. For `git-tag`, `HEAD` must be exactly on a SemVer tag.
|
|
475
|
+
For `env`, set `OMNIDIST_VERSION`. For `file`, create the configured version
|
|
476
|
+
file.
|
|
477
|
+
|
|
478
|
+
`omnidist stage` says the build version file is missing:
|
|
479
|
+
|
|
480
|
+
Run `omnidist build` first. Stage commands use the build version persisted under
|
|
481
|
+
`.omnidist/<profile>/dist/VERSION`.
|
|
482
|
+
|
|
483
|
+
npm install cannot find a platform package:
|
|
484
|
+
|
|
485
|
+
Run `omnidist npm verify` before publishing. It checks package versions,
|
|
486
|
+
platform `os` and `cpu` fields, required binaries, forbidden `postinstall`
|
|
487
|
+
scripts, repository metadata, and optional dependency parity.
|
|
488
|
+
|
|
489
|
+
Trusted npm publish fails:
|
|
490
|
+
|
|
491
|
+
Verify that `distributions.npm.repository-url` matches the GitHub repository,
|
|
492
|
+
the workflow grants `id-token: write`, and every npm package has a trusted
|
|
493
|
+
publisher configured.
|
|
494
|
+
|
|
495
|
+
uv publish rejects the version:
|
|
496
|
+
|
|
497
|
+
Restage with a publishable version. PyPI and TestPyPI reject local version
|
|
498
|
+
metadata containing `+`.
|
|
499
|
+
|
|
500
|
+
## Contributing
|
|
501
|
+
|
|
502
|
+
For repository layout, development workflow, package model details, and migration
|
|
503
|
+
notes, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
data/exe/omnidist
ADDED
data/lib/omnidist.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
data/libexec/omnidist
ADDED
|
Binary file
|
data/omnidist.gemspec
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Gem::Specification.new do |spec|
|
|
2
|
+
spec.name = "omnidist"
|
|
3
|
+
spec.version = "0.1.35"
|
|
4
|
+
spec.summary = "Prebuilt omnidist CLI packaged by omnidist"
|
|
5
|
+
spec.description = "Prebuilt omnidist CLI packaged by omnidist with platform-specific binaries"
|
|
6
|
+
spec.authors = ["omnidist"]
|
|
7
|
+
spec.licenses = ["MIT"]
|
|
8
|
+
spec.homepage = "https://github.com/metalagman/omnidist"
|
|
9
|
+
spec.platform = Gem::Platform.new("x86_64-linux")
|
|
10
|
+
spec.required_ruby_version = ">= 3.1"
|
|
11
|
+
spec.bindir = "exe"
|
|
12
|
+
spec.executables = ["omnidist"]
|
|
13
|
+
spec.require_paths = ["lib"]
|
|
14
|
+
spec.files = Dir["lib/**/*", "exe/*", "libexec/**/*", "*.gemspec"].sort
|
|
15
|
+
spec.metadata = {
|
|
16
|
+
"rubygems_mfa_required" => "true",
|
|
17
|
+
"source_code_uri" => "https://github.com/metalagman/omnidist",
|
|
18
|
+
}
|
|
19
|
+
spec.files << "README.md" if File.exist?("README.md")
|
|
20
|
+
spec.files << "LICENSE" if File.exist?("LICENSE")
|
|
21
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: omnidist
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.35
|
|
5
|
+
platform: x86_64-linux
|
|
6
|
+
authors:
|
|
7
|
+
- omnidist
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Prebuilt omnidist CLI packaged by omnidist with platform-specific binaries
|
|
13
|
+
executables:
|
|
14
|
+
- omnidist
|
|
15
|
+
extensions: []
|
|
16
|
+
extra_rdoc_files: []
|
|
17
|
+
files:
|
|
18
|
+
- LICENSE
|
|
19
|
+
- README.md
|
|
20
|
+
- exe/omnidist
|
|
21
|
+
- lib/omnidist.rb
|
|
22
|
+
- libexec/omnidist
|
|
23
|
+
- omnidist.gemspec
|
|
24
|
+
homepage: https://github.com/metalagman/omnidist
|
|
25
|
+
licenses:
|
|
26
|
+
- MIT
|
|
27
|
+
metadata:
|
|
28
|
+
rubygems_mfa_required: 'true'
|
|
29
|
+
source_code_uri: https://github.com/metalagman/omnidist
|
|
30
|
+
rdoc_options: []
|
|
31
|
+
require_paths:
|
|
32
|
+
- lib
|
|
33
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '3.1'
|
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '0'
|
|
43
|
+
requirements: []
|
|
44
|
+
rubygems_version: 3.6.9
|
|
45
|
+
specification_version: 4
|
|
46
|
+
summary: Prebuilt omnidist CLI packaged by omnidist
|
|
47
|
+
test_files: []
|