Allows you to get the npm version of the package in your Github Actions workflow
path
: The directory where package.json can be found (defaults to root of repo)
version
: The version of current NPM package
on: push
name: Create Build
jobs:
build:
name: Create Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
# From now you can access the version
- name: Print version
run: echo ${{ steps.extract_version.outputs.version }}
on: push
name: Create Build
jobs:
build:
name: Create Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
with:
path: mysubdir
# From now you can access the version
- name: Print version
run: echo ${{ steps.extract_version.outputs.version }}