Skip to content

Commit 35a01f0

Browse files
committed
🐛 fix for git tag order
1 parent c066e25 commit 35a01f0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/_publish-code.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ jobs:
3030

3131
- name: Publish
3232
run: |
33+
# sort pre-releases after main version
34+
git config versionsort.suffix "-"
35+
3336
cd ./dist
3437
3538
#
3639
# Alpha, Beta, RC versions are published in their own tag.
3740
# Normal versions are published to the 'latest' tag.
3841
#
39-
git_tag=$(git tag --sort=-v:refname | head -n 2 | tail -1)
42+
git_tag=$(git tag --sort=-v:refname | head -n 1)
4043
tag=$(echo "${git_tag}" | pcregrep -e '-(alpha|beta|rc)[0-9]?$' -o1)
4144
if [ -n "${tag}" ]; then
4245
npm_tag="${tag}"

0 commit comments

Comments
 (0)