Skip to content

This Action scans for a package.json file and reads the version number from that. Secure drop-in replacement for martinbeentjes/npm-get-version-action.

License

Notifications You must be signed in to change notification settings

step-security/npm-get-version-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StepSecurity Maintained npm-get-version-action Actions

Forked from: martinbeentjes/npm-get-version-action

This GitHub Action retrieves the package version from the package.json file and sets the version in the current-version output value usable in your workflow file.

Example

To use this action in your project, use the following:

- name: get-npm-version
  id: package-version
  uses: step-security/npm-get-version-action@v1

The Action sets an output variable called current-version which can be used in a following step by using ${{ steps.package-version.outputs.current-version}}.

If you are using a monorepo or otherwise have some packages in a subdirectory of your repo, add the path to the package.json as a parameter:

- name: get-npm-version
  id: package-version
  uses: step-security/npm-get-version-action@v1
  with:
    path: packages/<yourpackage>

About

This Action scans for a package.json file and reads the version number from that. Secure drop-in replacement for martinbeentjes/npm-get-version-action.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •