Skip to content

daschaa/package-version

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get version number from package.json

This GitHub action gets the version number from a package.json.

Current version MIT License

Usage

on: [push]

jobs:
  test-package-version:
    runs-on: ubuntu-latest
    name: Get package version
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Get package version
        id: get_version
        uses: daschaa/[email protected]
        with:
          path: './package.json'
      - name: Output package version
        run: echo "The package version is ${{ steps.get_version.outputs.current-version }}"

Supported Parameters

Parameter Description Default
path Path to package.json package.json

Outputs

The following output values can be accessed via ${{ steps.<step-id>.outputs.<output-name> }}:

Name Description Type
current-version The version number extracted from the package.json string

License

The source code for this project is released under the MIT License. This project is not associated with GitHub.

About

✍️ GitHub Action to fetch package.json version

Resources

License

Stars

Watchers

Forks