File tree 4 files changed +18
-2
lines changed
4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 25
25
26
26
- name : Extract version
27
27
id : extract_version
28
- uses :
Saionaro/[email protected] .2
28
+ uses :
Saionaro/[email protected] .3
29
29
# From now you can access version
30
30
- name : Print version
31
31
run : echo ${{ steps.extract_version.outputs.version }}
Original file line number Diff line number Diff line change @@ -369,9 +369,17 @@ const workspace = process.env.GITHUB_WORKSPACE;
369
369
async function run ( ) {
370
370
try {
371
371
const packagePath = path . join ( workspace , "package.json" ) ;
372
+
373
+ console . log ( packagePath ) ;
374
+
372
375
const pkg = require ( packagePath ) ;
376
+
377
+ console . log ( pkg ) ;
378
+
373
379
const version = pkg . version . toString ( ) ;
374
380
381
+ console . log ( version ) ;
382
+
375
383
core . setOutput ( "version" , version ) ;
376
384
} catch ( error ) {
377
385
core . setFailed ( error . message ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " extract-package-version" ,
3
- "version" : " 1.0.2 " ,
3
+ "version" : " 1.0.3 " ,
4
4
"description" : " Allows you to get the npm version of the package in your Github Actions workflow" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -6,9 +6,17 @@ const workspace = process.env.GITHUB_WORKSPACE;
6
6
async function run ( ) {
7
7
try {
8
8
const packagePath = path . join ( workspace , "package.json" ) ;
9
+
10
+ console . log ( packagePath ) ;
11
+
9
12
const pkg = require ( packagePath ) ;
13
+
14
+ console . log ( pkg ) ;
15
+
10
16
const version = pkg . version . toString ( ) ;
11
17
18
+ console . log ( version ) ;
19
+
12
20
core . setOutput ( "version" , version ) ;
13
21
} catch ( error ) {
14
22
core . setFailed ( error . message ) ;
You can’t perform that action at this time.
0 commit comments