@@ -55,39 +55,76 @@ inputs:
5555outputs :
5656 version :
5757 description : " The resulting version change"
58+ value : ${{ steps.version.outputs.version }}
5859 version_docker :
5960 description : " The resulting version change formatted to be compatible with docker tags"
61+ value : ${{ steps.version.outputs.version_docker }}
6062 version_dotnet :
6163 description : " The resulting version change formatted to be compatible with dotnet"
64+ value : ${{ steps.version.outputs.version_dotnet }}
6265 major :
6366 description : " If parsing, the major version"
67+ value : ${{ steps.version.outputs.major }}
6468 minor :
6569 description : " If parsing, the minor version"
70+ value : ${{ steps.version.outputs.minor }}
6671 patch :
6772 description : " If parsing, the patch version"
73+ value : ${{ steps.version.outputs.patch }}
6874 prerelease :
6975 description : " If parsing, the prerelease version"
76+ value : ${{ steps.version.outputs.prerelease }}
7077 build :
7178 description : " If parsing, the build version"
79+ value : ${{ steps.version.outputs.build }}
7280 v1 :
7381 description : " If comparing, the first version"
82+ value : ${{ steps.version.outputs.v1 }}
7483 v2 :
7584 description : " If comparing, the second version"
85+ value : ${{ steps.version.outputs.v2 }}
7686 result :
7787 description : " If comparing, the result of the comparison (-1|0|1)"
88+ value : ${{ steps.version.outputs.result }}
7889 command :
7990 description : " If comparing, the comparison that was run"
91+ value : ${{ steps.version.outputs.command }}
8092runs :
81- using : " docker"
82- image : " Dockerfile"
83- args :
84- - ${{ inputs.command }}
85- - ${{ inputs.sub-command }}
86- - ${{ inputs.value || '' }}
87- - ${{ inputs.compare-to || '' }}
88- - ${{ inputs.prerelease && '--prerelease' || '' }}
89- - ${{ inputs.prerelease || '' }}
90- - ${{ inputs.build && '--build' || '' }}
91- - ${{ inputs.build || '' }}
92- - ${{ inputs.config && '--config' || '' }}
93- - ${{ inputs.config || '' }}
93+ using : " composite"
94+ steps :
95+ - id : debug
96+ name : Debug
97+ shell : bash
98+ run : |
99+ echo "ACTION: ${{ inputs.action }}"
100+ echo "COMMAND: ${{ inputs.command }}"
101+ echo "PRE: ${{ inputs.pre }}"
102+ echo "NAME: ${{ inputs.name }}"
103+ echo "VALUE: ${{ inputs.value }}"
104+ echo "BUILD: ${{ inputs.build }}"
105+ echo "CURRENT: ${{ inputs.current }}"
106+ echo "CONFIG: ${{ inputs.config }}"
107+
108+ - id : debug-config-exists
109+ name : Debug Config Exists
110+ shell : bash
111+ run : |
112+ if [[ -f "${{ inputs.config }}" ]]; then
113+ echo "Config file exists at path: ${{ inputs.config }}"
114+ else
115+ echo "No config file found at path: ${{ inputs.config }}"
116+ fi
117+
118+ - id : version
119+ name : Run Semver ${{ inputs.command }}
120+ shell : bash
121+ run : |
122+ semver $COMMAND $SUB_COMMAND $VALUE $COMPARE_TO $PRERELEASE $BUILD $CONFIG
123+ env :
124+ COMMAND : " ${{ inputs.command }}"
125+ SUB_COMMAND : " ${{ inputs.sub-command }}"
126+ VALUE : " ${{ inputs.value && format(' {0}', inputs.value) || '' }}"
127+ COMPARE_TO : " ${{ inputs.compare-to && format('{0}', inputs.compare-to) || '' }}"
128+ PRERELEASE : " ${{ inputs.prerelease && format('--prerelease {0}', inputs.prerelease) || '' }}"
129+ BUILD : " ${{ inputs.build && format(' --build {0}', inputs.build) || '' }}"
130+ CONFIG : " ${{ inputs.config && format(' --config \" {0}\" ', inputs.config) || '' }}"
0 commit comments