This action gets the version number in your package.json for use in other steps.
The directory your package.json is in. Default ..
The version in your package.json
on: [push]jobs:
print-version:
runs-on: ubuntu-latestname: A job to print the versionsteps:
- name: checkout repositoryuses: actions/checkout@v3
- name: test actionid: get-versionuses: beaconbrigade/package-json-version@v0.3with:
path: .
- name: Print the versionrun: echo "The version was ${{ steps.get-version.outputs.version }}"