Skip to content

Commit 454ef1a

Browse files
Merge pull request #112 from codacy/ls/output-non-prefix-version
feat: output non prefixed version in action
2 parents 0a24493 + cbc6a85 commit 454ef1a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ outputs:
4040
version:
4141
description: 'The value of the new pre-calculated tag'
4242
value: ${{ steps.version.outputs.version }}
43+
non-prefixed-version:
44+
description: 'The value of the new pre-calculated tag without the prefix'
45+
value: ${{ steps.version.outputs.non-prefixed-version }}
4346
previous-version:
4447
description: 'Contains the value of previous tag, before calculating a new one'
4548
value: ${{ steps.previous-version.outputs.previous-version }}
@@ -85,6 +88,9 @@ runs:
8588
--log-paths="${{ inputs.log-paths }}" \
8689
${{ inputs.skip-prerelease == 'true' && '--skip-prerelease' || '' }} \
8790
--version-prefix "${{ inputs.prefix }}")
88-
91+
92+
prefix="${{ inputs.prefix }}"
93+
non_prefixed_version=${VERSION#"$prefix"}
94+
echo "non-prefixed-version=$non_prefixed_version" >> $GITHUB_OUTPUT
8995
echo "version=$VERSION" >> $GITHUB_OUTPUT
9096
echo "New Version: $VERSION"

0 commit comments

Comments
 (0)