Skip to content

Commit 1216959

Browse files
Return version without suffix in project-info (#31)
* Added 'Extract release version from the nearest tag' step into CI
1 parent 61a1761 commit 1216959

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/project-info.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ jobs:
5656
- name: Show nearest tag
5757
run: echo "${{ steps.nearest-tag.outputs.value }}"
5858

59+
- name: Extract release version from the nearest tag
60+
id: nearest-release-version
61+
run: echo "value=$(echo "${{ steps.nearest-tag.outputs.value }}" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/')" >> $GITHUB_OUTPUT
62+
5963
- name: Get next release version
6064
id: version
6165
uses: HardNorth/github-version-generate@v1.4.0
6266
with:
63-
version: ${{ steps.nearest-tag.outputs.value }}
67+
version: ${{ steps.nearest-release-version.outputs.value }}
6468
next-version-increment-patch: ${{ contains(inputs.update-fragment, 'patch') }}
6569
next-version-increment-minor: ${{ contains(inputs.update-fragment, 'minor') }}
6670
next-version-increment-major: ${{ contains(inputs.update-fragment, 'major') }}

0 commit comments

Comments
 (0)