Skip to content

Commit 418081e

Browse files
Copilotpetesramek
andauthored
fix: wire extract-version default fallback through GITHUB_OUTPUT
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/ad9595f6-0781-422d-96d0-6dab787450f2 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent d61bfe2 commit 418081e

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

  • .github/actions/versioning/extract-version

.github/actions/versioning/extract-version/action.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
outputs:
2323
version:
2424
description: 'Version extracted from the branch name.'
25-
value: ${{ steps.regex-match.outputs.match }}
25+
value: ${{ steps.resolve-version.outputs.version }}
2626

2727
runs:
2828
using: "composite"
@@ -43,14 +43,9 @@ runs:
4343
regex: ${{ inputs.version-format }}
4444
flags: 'g'
4545

46-
- name: 'Set extracted version output'
47-
if: steps.regex-match.outputs.match != ''
46+
- name: 'Resolve version'
47+
id: resolve-version
4848
shell: bash
4949
run: |
50-
echo "version=${{ steps.regex-match.outputs.match }}" >> $GITHUB_OUTPUT
51-
52-
- name: 'Set default version output'
53-
if: steps.regex-match.outputs.match == ''
54-
shell: bash
55-
run: |
56-
echo "version=${{ inputs.default-version }}" >> $GITHUB_OUTPUT
50+
VERSION="${{ steps.regex-match.outputs.match }}"
51+
echo "version=${VERSION:-${{ inputs.default-version }}}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)