Skip to content

Commit aa5552b

Browse files
committed
Add debug logs
1 parent 1bb4b45 commit aa5552b

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Extract version
2727
id: extract_version
28-
uses: Saionaro/[email protected].2
28+
uses: Saionaro/[email protected].3
2929
# From now you can access version
3030
- name: Print version
3131
run: echo ${{ steps.extract_version.outputs.version }}

dist/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,17 @@ const workspace = process.env.GITHUB_WORKSPACE;
369369
async function run() {
370370
try {
371371
const packagePath = path.join(workspace, "package.json");
372+
373+
console.log(packagePath);
374+
372375
const pkg = require(packagePath);
376+
377+
console.log(pkg);
378+
373379
const version = pkg.version.toString();
374380

381+
console.log(version);
382+
375383
core.setOutput("version", version);
376384
} catch (error) {
377385
core.setFailed(error.message);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extract-package-version",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Allows you to get the npm version of the package in your Github Actions workflow",
55
"main": "index.js",
66
"scripts": {

src/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@ const workspace = process.env.GITHUB_WORKSPACE;
66
async function run() {
77
try {
88
const packagePath = path.join(workspace, "package.json");
9+
10+
console.log(packagePath);
11+
912
const pkg = require(packagePath);
13+
14+
console.log(pkg);
15+
1016
const version = pkg.version.toString();
1117

18+
console.log(version);
19+
1220
core.setOutput("version", version);
1321
} catch (error) {
1422
core.setFailed(error.message);

0 commit comments

Comments
 (0)