Skip to content

Commit e6ce6b4

Browse files
committed
fix: Major sometimes can be just "v"
1 parent b15a8a5 commit e6ce6b4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sandbox.sh

action.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ runs:
2828
env:
2929
VERSION: ${{ inputs.version }}
3030
run: |
31+
if [[ $VERSION != v* ]]; then
32+
VERSION=v$VERSION
33+
fi
34+
3135
MAJOR=${VERSION%%.*}
3236
3337
if [[ $MAJOR != v* ]]; then
3438
MAJOR=v${MAJOR:1}
3539
fi
3640
37-
if [[ $VERSION != v* ]]; then
38-
VERSION=v$VERSION
39-
fi
41+
echo "semver: $VERSION"
42+
echo "major: $MAJOR"
4043
4144
echo "major=$MAJOR" >> $GITHUB_OUTPUT
4245
echo "semver=$VERSION" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)