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