Skip to content

Commit 2dc55ee

Browse files
authored
Update version extraction logic for release workflows (#662)
fix: update version extraction logic and error message for tag validation
1 parent 95bd124 commit 2dc55ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/wf-build-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
- uses: actions/checkout@v5
1313
name: Checkout Code
1414

15-
- name: Check github.ref starts with 'refs/tags/'
16-
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
15+
- name: Check github.ref starts with 'refs/tags/v'
16+
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
1717
shell: bash
1818
run: |
19-
echo Error! github.ref does not start with 'refs/tags'
19+
echo Error! github.ref does not start with 'refs/tags/v'
2020
echo github.ref: ${{ github.ref }}
2121
exit 1
2222
@@ -25,7 +25,7 @@ jobs:
2525
github_ref: ${{ github.ref }}
2626
shell: bash
2727
run: |
28-
version="${github_ref:10}"
28+
version="${github_ref:11}"
2929
echo version=$version
3030
echo "version=$version" >> $GITHUB_ENV
3131

0 commit comments

Comments
 (0)