A cross-platform GitHub workflow action to output the version number of a package in a workflow.
In a typical GitHub workflow you'll use this to retrieve the package.json version so that it can be used with later workflow steps.
- name: Get package.json version
id: package-version
uses: jan-tee/nodejs-pkg-version-action@v1
with:
path: '${{ github.workspace }}/package.json'
The output goes into version
.
You could then reference it later, e.g. as ${{ steps.package-version.outputs.version }}
.