From a1952c71f719488c7b0a6093d914d3db3d22a663 Mon Sep 17 00:00:00 2001 From: Kilian Brachtendorf Date: Sat, 8 Mar 2025 02:28:16 +0100 Subject: [PATCH] docs: add note about bun publish respecting `NPM_CONFIG_TOKEN` (#17975) --- docs/cli/publish.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/cli/publish.md b/docs/cli/publish.md index e26ff7f100..29f3ed1877 100644 --- a/docs/cli/publish.md +++ b/docs/cli/publish.md @@ -82,6 +82,11 @@ The `--dry-run` flag can be used to simulate the publish process without actuall $ bun publish --dry-run ``` +### `--gzip-level` + +Specify the level of gzip compression to use when packing the package. Only applies to `bun publish` without a tarball path argument. Values range from `0` to `9` (default is `9`). +{% bunCLIUsage command="publish" /%} + ### `--auth-type` If you have 2FA enabled for your npm account, `bun publish` will prompt you for a one-time password. This can be done through a browser or the CLI. The `--auth-type` flag can be used to tell the npm registry which method you prefer. The possible values are `web` and `legacy`, with `web` being the default. @@ -102,7 +107,6 @@ Provide a one-time password directly to the CLI. If the password is valid, this $ bun publish --otp 123456 ``` -### `--gzip-level` - -Specify the level of gzip compression to use when packing the package. Only applies to `bun publish` without a tarball path argument. Values range from `0` to `9` (default is `9`). -{% bunCLIUsage command="publish" /%} \ No newline at end of file +{% callout %} +**Note** - `bun publish` respects the `NPM_CONFIG_TOKEN` environment variable which can be used when publishing in github actions or automated workflows. +{% /callout %}