Skip to content

Commit

Permalink
fix: gh act output
Browse files Browse the repository at this point in the history
  • Loading branch information
wintbiit committed Dec 12, 2023
1 parent 4d172ee commit fbc448c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,14 @@ jobs:
id: get-current-tag
uses: actions-ecosystem/[email protected]

- name: Decide Should_Push Or Not
- name: Output New Version
id: should_push
run: |
old_version=${{steps.get-previous-tag.outputs.tag}}
new_version=${{steps.get-current-tag.outputs.tag }}
old_array=(${old_version//\./ })
new_array=(${new_version//\./ })
if [ ${old_array[0]} != ${new_array[0]} ]
then
echo "NEW_VERSION=${new_version}" >> $GITHUB_OUTPUT
elif [ ${old_array[1]} != ${new_array[1]} ]
then
echo "NEW_VERSION=${new_version}" >> $GITHUB_OUTPUT
elif [ ${old_array[2]} != ${new_array[2]} ]
then
echo "NEW_VERSION=${new_version}" >> $GITHUB_OUTPUT
if [ "$old_version" != "$new_version" ]; then
echo "NEW_VERSION=$new_version" >> $GITHUB_OUTPUT
else
echo "NEW_VERSION=" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit fbc448c

Please sign in to comment.