@omnidist/omnidist-linux-x64 0.1.31 → 0.1.34
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 +81 -11
- package/bin/omnidist +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://pypi.org/project/omnidist/)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
Package and publish a Go CLI as npm and
|
|
12
|
+
Package and publish a Go CLI as npm, uv, and RubyGems installable tools with prebuilt
|
|
13
13
|
cross-platform binaries.
|
|
14
14
|
|
|
15
15
|
`omnidist` gives Go CLI maintainers one repeatable release flow:
|
|
@@ -21,16 +21,19 @@ build -> stage -> verify -> publish
|
|
|
21
21
|
The generated npm packages use platform-specific optional dependencies, so users
|
|
22
22
|
can run your CLI with `npx` without install-time downloader scripts. The uv
|
|
23
23
|
distribution stages wheel artifacts so users can run the same CLI from Python
|
|
24
|
-
tooling with `uvx`.
|
|
24
|
+
tooling with `uvx`. The RubyGems distribution stages platform-specific gems so
|
|
25
|
+
users can install the same CLI with `gem install`.
|
|
25
26
|
|
|
26
27
|
## Requirements
|
|
27
28
|
|
|
28
29
|
- Go 1.25+
|
|
29
30
|
- Node.js and npm for npm staging, verification, and publishing
|
|
30
31
|
- `uv` for uv staging, verification, and publishing
|
|
32
|
+
- Ruby and RubyGems for gem staging, verification, and publishing
|
|
31
33
|
- `git` when `version.source: git-tag`
|
|
32
34
|
- `NPM_PUBLISH_TOKEN` for npm token publishing, unless using `--dry-run` or trusted publishing
|
|
33
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
|
|
34
37
|
|
|
35
38
|
## Install
|
|
36
39
|
|
|
@@ -55,6 +58,13 @@ go install github.com/metalagman/omnidist/cmd/omnidist@latest
|
|
|
55
58
|
omnidist --help
|
|
56
59
|
```
|
|
57
60
|
|
|
61
|
+
Install with RubyGems after publication:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
gem install omnidist
|
|
65
|
+
omnidist --help
|
|
66
|
+
```
|
|
67
|
+
|
|
58
68
|
Run from a checkout:
|
|
59
69
|
|
|
60
70
|
```bash
|
|
@@ -84,6 +94,7 @@ At minimum, check these fields:
|
|
|
84
94
|
- `tool.main`: the Go main package, for example `./cmd/mytool`.
|
|
85
95
|
- `distributions.npm.package`: the npm package, for example `@my-org/mytool`.
|
|
86
96
|
- `distributions.uv.package`: the uv/PyPI package, for example `mytool`.
|
|
97
|
+
- `distributions.gem.package`: the RubyGems package, for example `mytool`.
|
|
87
98
|
- `version.source`: usually `git-tag`, `file`, `env`, or `fixed`.
|
|
88
99
|
|
|
89
100
|
Then run the local release pipeline:
|
|
@@ -108,8 +119,8 @@ omnidist ci
|
|
|
108
119
|
|
|
109
120
|
The generated workflow is written to `.github/workflows/omnidist-release.yml`.
|
|
110
121
|
It runs on `v*` tag pushes, builds once, stages and verifies artifacts, publishes
|
|
111
|
-
npm and
|
|
112
|
-
the GitHub release.
|
|
122
|
+
npm, uv, and gem distributions, then uploads the built binaries and `checksums.txt`
|
|
123
|
+
to the GitHub release.
|
|
113
124
|
|
|
114
125
|
## Configuration
|
|
115
126
|
|
|
@@ -157,6 +168,13 @@ profiles:
|
|
|
157
168
|
index-url: https://upload.pypi.org/legacy/
|
|
158
169
|
linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
|
|
159
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
|
|
160
178
|
```
|
|
161
179
|
|
|
162
180
|
Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`. If `profiles`
|
|
@@ -168,13 +186,15 @@ but do not mix top-level runtime fields with a `profiles` map in the same file.
|
|
|
168
186
|
|
|
169
187
|
Targets use Go values: `os` is `GOOS`, and `arch` is `GOARCH`. Distribution
|
|
170
188
|
workflows map them as needed, for example `windows/amd64` becomes npm
|
|
171
|
-
`win32/x64`.
|
|
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.
|
|
172
192
|
|
|
173
193
|
## Versioning
|
|
174
194
|
|
|
175
195
|
`omnidist build` resolves the release version and writes it to
|
|
176
196
|
`.omnidist/<profile>/dist/VERSION`. Stage and publish commands use that build
|
|
177
|
-
version so npm and
|
|
197
|
+
version so npm, uv, and gem artifacts stay in sync.
|
|
178
198
|
|
|
179
199
|
Supported version sources:
|
|
180
200
|
|
|
@@ -205,6 +225,9 @@ Environment variables:
|
|
|
205
225
|
- `OMNIDIST_OMNIDIST_ROOT`: project root directory, equivalent to `--omnidist-root`.
|
|
206
226
|
- `NPM_PUBLISH_TOKEN`: npm token for `distributions.npm.publish-auth: token`.
|
|
207
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.
|
|
208
231
|
|
|
209
232
|
Build `ldflags` template variables:
|
|
210
233
|
|
|
@@ -306,6 +329,43 @@ omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <token>
|
|
|
306
329
|
`omnidist uv verify` rejects versions with local metadata (`+...`) for
|
|
307
330
|
PyPI/TestPyPI publishing, because those indexes reject local versions.
|
|
308
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
|
+
|
|
309
369
|
## README and License Staging
|
|
310
370
|
|
|
311
371
|
README source precedence during staging:
|
|
@@ -345,6 +405,8 @@ Before the first tag release, configure the required registry credentials:
|
|
|
345
405
|
- npm token mode: `NPM_PUBLISH_TOKEN` GitHub secret.
|
|
346
406
|
- npm trusted mode: npm trusted publishers for every staged npm package.
|
|
347
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.
|
|
348
410
|
|
|
349
411
|
Release by pushing a SemVer tag:
|
|
350
412
|
|
|
@@ -361,9 +423,9 @@ Top-level commands:
|
|
|
361
423
|
omnidist init
|
|
362
424
|
omnidist quickstart
|
|
363
425
|
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]
|
|
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]
|
|
367
429
|
omnidist ci [--force] [--dry-run]
|
|
368
430
|
omnidist version
|
|
369
431
|
```
|
|
@@ -393,9 +455,17 @@ omnidist uv verify
|
|
|
393
455
|
omnidist uv publish [--dry-run] [--publish-url <url>] [--token <token>]
|
|
394
456
|
```
|
|
395
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
|
+
|
|
396
466
|
Top-level `stage`, `verify`, and `publish` run distributions in deterministic
|
|
397
|
-
order: npm first, then uv. Use `--only` to limit the command to one
|
|
398
|
-
distributions.
|
|
467
|
+
order: npm first, then uv, then gem. Use `--only` to limit the command to one
|
|
468
|
+
or more distributions.
|
|
399
469
|
|
|
400
470
|
## Troubleshooting
|
|
401
471
|
|
package/bin/omnidist
CHANGED
|
Binary file
|
package/package.json
CHANGED