Skip to content

Github action to retrieve the version number in your package.json file for use in other actions

Notifications You must be signed in to change notification settings

Simpplr/package-json-version

 
 

Repository files navigation

package-json-version

This action gets the version number in your package.json for use in other steps.

Inputs

path

The directory your package.json is in. Default ..

Outputs

version

The version in your package.json

Example Usage

on: [push]

jobs:
  print-version:
    runs-on: ubuntu-latest
    name: A job to print the version
    steps:
      - name: checkout repository
        uses: actions/checkout@v3
      - name: test action
        id: get-version
        uses: beaconbrigade/[email protected]
        with:
          path: .
      - name: Print the version
        run: echo "The version was ${{ steps.get-version.outputs.version }}"

About

Github action to retrieve the version number in your package.json file for use in other actions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%