Skip to content

v2.0.0

Compare
Choose a tag to compare
@mcous mcous released this 20 Apr 14:58
· 60 commits to main since this release
v2.0.0
0be441d

Welcome to v2 of JS-DevTools/npm-publish! We've been doing some spring cleaning to fix all our (known) bugs and knock out some longstanding feature requests. This release has some breaking changes, so please read carefully!

BREAKING CHANGES

  • The type output is now an empty string instead of none when no release occurs

    - - if: ${{ steps.publish.outputs.type != 'none' }}
    + - if: ${{ steps.publish.outputs.type }}
        run:  echo "Version changed!"
  • The check-version and greater-version-only options have been removed and replaced with strategy.

    • Use strategy: all (default) to publish all versions that do not yet exist in the registry.
        with:
          token: ${{ secrets.NPM_TOKEN }}
      -   check-version: true
      -   greater-version-only: false
      +   strategy: all
    • Use strategy: upgrade to only publish versions that upgrade the selected tag.
        with:
          token: ${{ secrets.NPM_TOKEN }}
      -   check-version: true
      -   greater-version-only: true
      +   strategy: upgrade
    • check-version: false has been removed. You don't need this action if you're not checking already published versions; use npm directly, instead.
  • The library and CLI now require Node v16 or later. They may technically work in earlier versions, but they're not tested in CI and you will have to tell your package manager to ignore the engines requirement.

  • The library and CLI no longer read the user's ~/.npmrc file, so the token option is now required.

Features

  • tag, access, and registry now fall back to publishConfig in package.json, if specified. (#36)
  • The package argument may now be a directory, and is passed to npm publish as its package_spec argument. (#59)
  • The package argument may also be a pre-packed .tgz archive (#81)

Bug fixes

  • The user's ~/.npmrc file is no longer modified. Instead, a temporary .npmrc file is used. (#15)
  • npm is now always called with --ignore-scripts for security (#47)
  • npm is now always called in the current working directory (#51)
  • The action was updated to use the Node v16 runtime. (#61)
  • The @actions/core dependency was upgraded to fix deprecation warnings. (#67)