Skip to content

Commit f54231c

Browse files
authored
Simplify version extraction in release CI workflow (Only trim the leading v) (OrchardCMS#18872)
1 parent 7b45cfe commit f54231c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/release_ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ jobs:
2323
- name: Get the version
2424
id: get_version
2525
run: |
26-
arrTag=(${GITHUB_REF//\// })
27-
VERSION="${arrTag[2]}"
28-
VERSION="${VERSION//v}"
29-
echo VERSION:${VERSION}
30-
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
26+
# Strip leading 'v' if present
27+
VERSION="${GITHUB_REF_NAME#v}"
28+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
3129
shell: bash
3230
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3331
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0

0 commit comments

Comments
 (0)