jan-tee / nodejs-pkg-version-action

Outputs the version number from a package.json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nodejs-pkg-version-action

A cross-platform GitHub workflow action to output the version number of a package in a workflow.

Usage

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 }}.

About

Outputs the version number from a package.json

License:MIT License


Languages

Language:TypeScript 79.0%Language:JavaScript 21.0%