Skip to content

Commit 8ae8c59

Browse files
Fix publish of CLI through npm (#9573)
1 parent a9381ab commit 8ae8c59

9 files changed

Lines changed: 97 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ jobs:
296296
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
297297

298298
publish-nitro-cli-platforms:
299-
name: 🧱 Publish Nitro CLI (${{ matrix.rid }}) to npm
299+
name: 🧱 Publish Nitro CLI binary to npm
300300
runs-on: ubuntu-latest
301301
needs: [build-nitro-cli]
302302
if: startsWith(github.ref, 'refs/tags/')
@@ -305,21 +305,14 @@ jobs:
305305
id-token: write
306306
strategy:
307307
matrix:
308-
include:
309-
- rid: linux-x64
310-
binary: nitro
311-
- rid: linux-musl-x64
312-
binary: nitro
313-
- rid: linux-arm64
314-
binary: nitro
315-
- rid: osx-x64
316-
binary: nitro
317-
- rid: osx-arm64
318-
binary: nitro
319-
- rid: win-x64
320-
binary: nitro.exe
321-
- rid: win-x86
322-
binary: nitro.exe
308+
rid:
309+
- linux-x64
310+
- linux-musl-x64
311+
- linux-arm64
312+
- osx-x64
313+
- osx-arm64
314+
- win-x64
315+
- win-x86
323316

324317
steps:
325318
- name: 📦 Checkout
@@ -354,8 +347,8 @@ jobs:
354347
*.tar.gz) tar -xzf "$archive" ;;
355348
*.zip) unzip -q "$archive" ;;
356349
esac
357-
if [ "${{ matrix.binary }}" = "nitro" ]; then
358-
chmod +x "${{ matrix.binary }}"
350+
if [[ "${{ matrix.rid }}" != win-* ]]; then
351+
chmod +x nitro
359352
fi
360353
361354
- name: 🏷️ Set version
@@ -372,7 +365,8 @@ jobs:
372365
run: |
373366
npm publish "./chillicream-nitro-${{ matrix.rid }}-${GIT_TAG}.tgz" \
374367
--access public \
375-
--registry="${{ vars.NPM_REGISTRY_URL }}"
368+
--registry="${{ vars.NPM_REGISTRY_URL }}" \
369+
--tag latest
376370
377371
- name: 📤 Upload tarball as artifact
378372
uses: actions/upload-artifact@v7
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-linux-arm64
2+
3+
This package contains the platform-specific binary for `linux-arm64` (glibc).
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-linux-musl-x64
2+
3+
This package contains the platform-specific binary for `linux-musl-x64`.
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-linux-x64
2+
3+
This package contains the platform-specific binary for `linux-x64` (glibc).
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-osx-arm64
2+
3+
This package contains the platform-specific binary for `osx-arm64`.
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-osx-x64
2+
3+
This package contains the platform-specific binary for `osx-x64`.
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-win-x64
2+
3+
This package contains the platform-specific binary for `win-x64`.
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @chillicream/nitro-win-x86
2+
3+
This package contains the platform-specific binary for `win-x86`.
4+
5+
Use [@chillicream/nitro](https://www.npmjs.com/package/@chillicream/nitro) to invoke the Nitro CLI.
Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# @chillicream/nitro
22

3-
A CLI to interact with [Nitro](https://chillicream.com/products/nitro).
3+
The official CLI for ChilliCream's [Nitro](https://chillicream.com/products/nitro).
44

5-
For a full list of commands either run `npx @chillicream/nitro --help` or see the [documentation](https://chillicream.com/docs/nitro/cli-commands/api-key).
5+
## Usage
6+
7+
Run the CLI directly with your package manager of choice:
8+
9+
```bash
10+
# npm
11+
npx @chillicream/nitro@latest --help
12+
13+
# yarn
14+
yarn dlx @chillicream/nitro@latest --help
15+
16+
# pnpm
17+
pnpm dlx @chillicream/nitro@latest --help
18+
```
19+
20+
## GitHub Actions
21+
22+
If you want to invoke the CLI from a GitHub Actions workflow, use our official actions instead of installing the CLI manually:
23+
24+
### Schema
25+
26+
- [Nitro Schema Publish](https://github.com/marketplace/actions/nitro-schema-publish)
27+
- [Nitro Schema Upload](https://github.com/marketplace/actions/nitro-schema-upload)
28+
- [Nitro Schema Validate](https://github.com/marketplace/actions/nitro-schema-validate)
29+
30+
### Client
31+
32+
- [Nitro Client Publish](https://github.com/marketplace/actions/nitro-client-publish)
33+
- [Nitro Client Upload](https://github.com/marketplace/actions/nitro-client-upload)
34+
- [Nitro Client Validate](https://github.com/marketplace/actions/nitro-client-validate)
35+
36+
### Fusion
37+
38+
- [Nitro Fusion Publish](https://github.com/marketplace/actions/nitro-fusion-publish)
39+
- [Nitro Fusion Upload](https://github.com/marketplace/actions/nitro-fusion-upload)
40+
- [Nitro Fusion Validate](https://github.com/marketplace/actions/nitro-fusion-validate)
41+
42+
### MCP
43+
44+
- [Nitro MCP Publish](https://github.com/marketplace/actions/nitro-mcp-publish)
45+
- [Nitro MCP Upload](https://github.com/marketplace/actions/nitro-mcp-upload)
46+
- [Nitro MCP Validate](https://github.com/marketplace/actions/nitro-mcp-validate)
47+
48+
### OpenAPI
49+
50+
- [Nitro OpenAPI Publish](https://github.com/marketplace/actions/nitro-openapi-publish)
51+
- [Nitro OpenAPI Upload](https://github.com/marketplace/actions/nitro-openapi-upload)
52+
- [Nitro OpenAPI Validate](https://github.com/marketplace/actions/nitro-openapi-validate)

0 commit comments

Comments
 (0)