-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
# extract-package-version | ||
|
||
Allows you to get the npm version of the package in your Github Actions workflow | ||
|
||
## Usage | ||
|
||
### Outputs | ||
|
||
- `version`: The version of current NPM package | ||
|
||
### Example workflow - get NPM version | ||
|
||
```yaml | ||
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/extract-package-version@latest | ||
# From now you can access version | ||
- name: Print version | ||
run: echo ${{ steps.extract_version.outputs.version }} | ||
``` |