Skip to content

Commit

Permalink
fix: use conditional for default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Jan 3, 2024
1 parent fd16f7c commit cf7fac6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ runs:
shell: bash
id: bump
run: |
current_version="${{ inputs.version || steps.semver.outputs.latest-tag }}"
if [ -z "${{ inputs.version }}" ]; then
current_version="${{ steps.semver.outputs.latest-tag }}"
else
current_version="${{ inputs.version }}"
fi
bumped=$(echo $current_version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
echo "version=${bumped}" >> $GITHUB_OUTPUT
- name: Configure git
Expand Down

0 comments on commit cf7fac6

Please sign in to comment.