Skip to content

Commit 039b3bc

Browse files
committed
fixup: readme tweaks
1 parent d5d9f1d commit 039b3bc

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ Publish packages to npm automatically in GitHub Actions by updating the version
1010

1111
- [Change log][releases]
1212
- [v2 to v3 migration guide](#v2-to-v3)
13-
- [v1 to v2 migration guide](#v1-to-v2)
13+
- [v1 to v3 migration guide](#v1-to-v3)
1414

1515
[releases]: https://github.com/JS-DevTools/npm-publis/releases
1616

1717
## Features
1818

19-
- 🧠 **Smart**
19+
- 🧠 **Smart**
2020
Only publishes if the version number in `package.json` differs from the latest on npm.
2121

22-
- 🛠 **Configurable**
22+
- 🛠 **Configurable**
2323
Customize the version-checking behavior, the registry URL, and path of your package.
2424

25-
- 🔐 **Secure**
25+
- 🔐 **Secure**
2626
Keeps your npm authentication token secret. Doesn't read nor write to `~/.npmrc`.
2727

28-
-**Fast**
28+
-**Fast**
2929
100% JavaScript (which is faster than Docker) and bundled to optimize loading time.
3030

31-
- 📤 **Outputs**
31+
- 📤 **Outputs**
3232
Exposes the old and new version numbers, and the type of change (major, minor, patch, etc.) as variables that you can use in your workflow.
3333

3434
## Usage
@@ -287,17 +287,17 @@ For more detailed change logs, see [releases][].
287287

288288
### v2 to v3
289289

290-
The v3 release does not require any changes to how you use `npm-publish`. The version of Node.js used by the action was updated to v20 due to GitHub Action's [deprecation of Node.js v16][node16-deprecation]. The minimum required version of Node.js for the library and CLI remains v16.
290+
The v3 release does not require any changes to how you use `npm-publish` from `v2`. The version of Node.js used by the action was updated to v20 due to GitHub Action's [deprecation of Node.js v16][node16-deprecation]. The minimum required version of Node.js for the library and CLI remains v16.
291291

292292
[node16-deprecation]: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
293293

294-
### v1 to v2
294+
### v1 to v3
295295

296-
The v2 release made several breaking changes to inputs, outputs, and behaviors. The examples below focus on the action, but the same updates are applicable to the library and CLI, too.
296+
The v2 release made several breaking changes to inputs, outputs, and behaviors that were present in `v1`. The examples below focus on the action, but the same changes are applicable to the library and CLI, too.
297297

298298
#### v2 option changes
299299

300-
The `check-version` and `greater-version-only` boolean options have been replaced with the single `strategy` option:
300+
The `check-version` and `greater-version-only` boolean options were replaced with the `strategy` option:
301301

302302
- `strategy: all` (default) will publish any version that does not yet exist in the registry
303303
- `strategy: upgrade` will publish only if the version is a semver upgrade of the requested `dist-tag`
@@ -353,17 +353,19 @@ The `--ignore-scripts` option is now passed to `npm publish` as a security preca
353353
+ - run: npm run build
354354
355355
- - uses: JS-DevTools/npm-publish@v1
356-
+ - uses: JS-DevTools/npm-publish@v2
356+
+ - uses: JS-DevTools/npm-publish@v3
357357
with:
358358
token: ${{ secrets.NPM_TOKEN }}
359359
```
360360

361361
If you can't change your build, you can set the `ignore-scripts` input to `false` as a workaround. Be aware that failures during a lifecycle script can be difficult to debug, and any `stdout`/`stderr` output from your build script could interfere with how `npm-publish` interprets results from the `npm` CLI.
362362

363363
```diff
364-
with:
365-
token: ${{ secrets.NPM_TOKEN }}
366-
+ ignore-scripts: false
364+
- - uses: JS-DevTools/npm-publish@v1
365+
+ - uses: JS-DevTools/npm-publish@v3
366+
with:
367+
token: ${{ secrets.NPM_TOKEN }}
368+
+ ignore-scripts: false
367369
```
368370

369371
The global `.npmrc` file is no longer read nor modified. This means the `token` option is now required for the library and CLI. (It was already required for the action.) You may have workarounds in place referencing `INPUT_TOKEN`, which v1 [erroneously wrote][#15] to `.npmrc`. These workarounds should be removed.
@@ -375,7 +377,7 @@ The global `.npmrc` file is no longer read nor modified. This means the `token`
375377
registry-url: https://registry.npmjs.org/
376378
377379
- - uses: JS-DevTools/npm-publish@v1
378-
+ - uses: JS-DevTools/npm-publish@v2
380+
+ - uses: JS-DevTools/npm-publish@v3
379381
with:
380382
token: ${{ secrets.NPM_TOKEN }}
381383

0 commit comments

Comments
 (0)