File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 24
24
- name : Parse & check version
25
25
id : parse
26
26
run : |
27
+ set -e # Exit on error
27
28
parse_version_component() {
28
29
component=$(echo "$1" | cut -f"$2" -d.)
29
30
if [ -z "$component" ]; then
@@ -37,13 +38,12 @@ jobs:
37
38
git show-ref --tags v$1 --quiet && echo "true" || echo "false"
38
39
}
39
40
exists=$(check_git_tag_exists "$VERSION")
40
-
41
41
echo "semver=$VERSION" >> $GITHUB_OUTPUT
42
42
echo "major=$(parse_version_component "$VERSION" 1)" >> $GITHUB_OUTPUT
43
43
echo "minor=$(parse_version_component "$VERSION" 2)" >> $GITHUB_OUTPUT
44
44
echo "patch=$(parse_version_component "$VERSION" 3)" >> $GITHUB_OUTPUT
45
45
echo "exists=$exists" >> $GITHUB_OUTPUT
46
- echo "pushable=$(( [ "$GITHUB_REF" == "refs/heads/main" ] && [ "$exists" == "false" ] ) )" >> $GITHUB_OUTPUT
46
+ echo "pushable=$( [ "$GITHUB_REF" == "refs/heads/main" ] && [ "$exists" == "false" ] && echo "true" || echo "false" )" >> $GITHUB_OUTPUT
47
47
echo GitHub Output: $(cat $GITHUB_OUTPUT)
48
48
49
49
build :
You can’t perform that action at this time.
0 commit comments