Skip to content

Commit be39bf0

Browse files
authored
docs: link to provenance docs and note required npm version (#96)
1 parent e707b56 commit be39bf0

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Checkout source
3434
uses: actions/checkout@v3
3535

36-
- name: Install Node.js ${{ matrix.node }}
36+
- name: Install Node.js ${{ matrix.node-version }}
3737
uses: actions/setup-node@v3
3838
with:
3939
node-version: ${{ matrix.node-version }}
@@ -206,13 +206,10 @@ jobs:
206206
- name: Checkout source
207207
uses: actions/checkout@v3
208208

209-
- name: Install Node.js ${{ matrix.node-version }}
209+
- name: Install Node.js
210210
uses: actions/setup-node@v3
211211
with:
212-
node-version: "18"
213-
214-
- name: Install latest npm
215-
run: npm install -g npm
212+
node-version: "20"
216213

217214
- name: Download publish artifact
218215
uses: actions/download-artifact@v3

README.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,23 @@ jobs:
9999

100100
You can set any or all of the following input parameters using `with`:
101101

102-
| Name | Type | Default | Description |
103-
| ------------ | ---------------------- | -------------------------------- | ----------------------------------------------------------------------------- |
104-
| `token` | string | **required** | Authentication token to use with the configured registry. |
105-
| `registry` | string | `https://registry.npmjs.org/` \* | Registry URL to use. |
106-
| `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish |
107-
| `tag` | string | `latest` \* | [Distribution tag][npm-tag] to publish to. |
108-
| `access` | `public`, `restricted` | [npm defaults][npm-access] \* | Whether the package should be publicly visible or restricted. |
109-
| `provenance` | boolean | `false` \* | Run `npm publish` with the `--provenance` flag to add provenance statements. |
110-
| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
111-
| `dry-run` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
112-
113-
\* Default values for these options may be specified using `publishConfig` in `package.json`.
102+
| Name | Type | Default | Description |
103+
| --------------- | ---------------------- | ----------------------------- | -------------------------------------------------------------------------------- |
104+
| `token` | string | **required** | Authentication token to use with the configured registry. |
105+
| `registry`¹ | string | `https://registry.npmjs.org/` | Registry URL to use. |
106+
| `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish. |
107+
| `tag`¹ | string | `latest` | [Distribution tag][npm-tag] to publish to. |
108+
| `access`¹ | `public`, `restricted` | [npm defaults][npm-access] | Whether the package should be publicly visible or restricted. |
109+
| `provenance`¹ ² | boolean | `false` | Run `npm publish` with the `--provenance` flag to add [provenance][] statements. |
110+
| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
111+
| `dry-run` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
112+
113+
1. May be specified using `publishConfig` in `package.json`.
114+
2. Provenance requires npm `>=9.5.0`.
114115

115116
[npm-tag]: https://docs.npmjs.com/cli/v9/commands/npm-publish#tag
116117
[npm-access]: https://docs.npmjs.com/cli/v9/commands/npm-publish#access
118+
[provenance]: https://docs.npmjs.com/generating-provenance-statements
117119

118120
### Output
119121

@@ -172,20 +174,21 @@ As shown in the example above, you should pass an options object to the `npmPubl
172174
import type { Options } from "@jsdevtools/npm-publish";
173175
```
174176

175-
| Name | Type | Default | Description |
176-
| -------------------- | ---------------------- | -------------------------------- | ----------------------------------------------------------------------------- |
177-
| `token` | string | **required** | Authentication token to use with the configured registry. |
178-
| `registry` | string, `URL` | `https://registry.npmjs.org/` \* | Registry URL to use. |
179-
| `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish |
180-
| `tag` | string | `latest` \* | [Distribution tag][npm-tag] to publish to. |
181-
| `access` | `public`, `restricted` | [npm defaults][npm-access] \* | Whether the package should be publicly visible or restricted. |
182-
| `provenance` | boolean | `false` \* | Run `npm publish` with the `--provenance` flag to add provenance statements. |
183-
| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
184-
| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
185-
| `logger` | object | `undefined` | Logging interface with `debug`, `info`, and `error` log methods. |
186-
| `temporaryDirectory` | string | `os.tmpdir()` | Temporary directory to hold a generated `.npmrc` file |
187-
188-
\* Default values for these options may be specified using `publishConfig` in `package.json`.
177+
| Name | Type | Default | Description |
178+
| -------------------- | ---------------------- | ----------------------------- | -------------------------------------------------------------------------------- |
179+
| `token` | string | **required** | Authentication token to use with the configured registry. |
180+
| `registry`¹ | string, `URL` | `https://registry.npmjs.org/` | Registry URL to use. |
181+
| `package` | string | Current working directory | Path to a package directory, a `package.json`, or a packed `.tgz` to publish. |
182+
| `tag`¹ | string | `latest` | [Distribution tag][npm-tag] to publish to. |
183+
| `access`¹ | `public`, `restricted` | [npm defaults][npm-access] | Whether the package should be publicly visible or restricted. |
184+
| `provenance`¹ ² | boolean | `false` | Run `npm publish` with the `--provenance` flag to add [provenance][] statements. |
185+
| `strategy` | `all`, `upgrade` | `all` | Use `all` to publish all unique versions, `upgrade` for only semver upgrades. |
186+
| `dryRun` | boolean | `false` | Run `npm publish` with the `--dry-run` flag to prevent publication. |
187+
| `logger` | object | `undefined` | Logging interface with `debug`, `info`, and `error` log methods. |
188+
| `temporaryDirectory` | string | `os.tmpdir()` | Temporary directory to hold a generated `.npmrc` file |
189+
190+
1. May be specified using `publishConfig` in `package.json`.
191+
2. Provenance requires npm `>=9.5.0`.
189192

190193
### Output
191194

@@ -224,7 +227,7 @@ npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE
224227
You can customize your call with options to change the registry, package, etc.
225228

226229
```bash
227-
npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --registry http://example.com ./path/to/package
230+
npx npm-publish --token YOUR_NPM_AUTH_TOKEN_HERE --registry http://example.com ./path/to/package
228231
```
229232

230233
### Options
@@ -266,7 +269,7 @@ Options:
266269
--debug Print debug logs.
267270

268271
-v, --version Print the version number.
269-
-h --help Show usage text.
272+
-h, --help Show usage text.
270273

271274
Examples:
272275

0 commit comments

Comments
 (0)