File tree 3 files changed +25
-0
lines changed
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 9
9
uses : actions/checkout@v4
10
10
11
11
- name : Test minimal.json
12
+ id : minimal_json
12
13
uses : ./
13
14
with :
14
15
file : test/minimal.json
15
16
17
+ - name : Print minimal.json info
18
+ shell : bash
19
+ run : |
20
+ echo "Codename: ${{steps.minimal_json.outputs.codename}}"
21
+ echo "Version: ${{steps.minimal_json.outputs.version}}"
22
+
16
23
- name : Test full.json
24
+ id : full_json
17
25
uses : ./
18
26
with :
19
27
file : test/full.json
28
+
29
+ - name : Print full.json info
30
+ shell : bash
31
+ run : |
32
+ echo "Codename: ${{steps.full_json.outputs.codename}}"
33
+ echo "Version: ${{steps.full_json.outputs.version}}"
Original file line number Diff line number Diff line change 8
8
official :
9
9
description : ' Set to `true` for official plugins, otherwise shows some warning when the plugin looks too official'
10
10
default : ' false'
11
+ outputs :
12
+ codename :
13
+ description : ' Plugin codename'
14
+ version :
15
+ description : ' Plugin version'
11
16
runs :
12
17
using : ' node20'
13
18
main : ' index.js'
Original file line number Diff line number Diff line change @@ -397,14 +397,20 @@ try
397
397
if ( ! json . hasOwnProperty ( "codename" ) )
398
398
core . error ( 'Missing `codename`' ) ;
399
399
else
400
+ {
400
401
checkCodename ( json [ 'codename' ] ) ;
402
+ core . setOutput ( 'codename' , json [ 'codename' ] ) ;
403
+ }
401
404
}
402
405
// version
403
406
{
404
407
if ( ! json . hasOwnProperty ( "version" ) )
405
408
core . error ( 'Missing `version`' ) ;
406
409
else
410
+ {
407
411
checkVersion ( json [ 'version' ] ) ;
412
+ core . setOutput ( 'version' , json [ 'version' ] ) ;
413
+ }
408
414
}
409
415
// name
410
416
{
You can’t perform that action at this time.
0 commit comments