Skip to content

Commit

Permalink
Fixed issue of name and description variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rexdefuror committed Nov 30, 2022
1 parent a729a13 commit fe1c072
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Reads a package.json file and returns the contents as environment variables. Nam

```yaml
- name: Package.json info
uses: rexdefuror/read-package-json@v1
uses: rexdefuror/read-package-json@v1.0.5

- run: echo "name - ${{ env.PACKAGE_NAME }}"
- run: echo "version - ${{ env.PACKAGE_VERSION }}"
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
"version": "1.0.4",
"version": "1.0.5",
"description": "",
"main": "lib/index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ const main = async () => {

const justFileName = fileName.split('.')[0];

exportVariable(`${justFileName}_NAME`, packageFile.name);
exportVariable(`${justFileName.toUpperCase()}_NAME`, packageFile.name);
exportVariable(`${justFileName.toUpperCase()}_VERSION`, packageFile.version);
exportVariable(`${justFileName.toUpperCase()}_DESCRIPTION`, packageFile.description);
}
catch (error: any) {
setFailed(error.message);
Expand Down

0 comments on commit fe1c072

Please sign in to comment.