Skip to content

Commit

Permalink
Add current and previous version outputs to the GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
rgryta committed Aug 29, 2024
1 parent 88c9790 commit 0650ca8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ outputs:
bumped:
description: 'Whether there was a bump or not [true|false]'
value: ${{ steps.bump.outputs.bumped }}
previous-version:
description: 'Previous version'
value: ${{ steps.bump.outputs.previous-version }}
current-version:
description: 'Updated version'
value: ${{ steps.bump.outputs.current-version }}
runs:
using: 'composite'
steps:
Expand All @@ -39,9 +45,11 @@ runs:
id: bump
shell: bash
run: |
echo "previous-version=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
bump-my-version bump ${{ inputs.args }}
exitcode="$?"
([[ ${exitcode} -gt 0 ]] && echo "bumped=false" || echo "bumped=true") >> $GITHUB_OUTPUT
([[ $? -gt 0 ]] && echo "bumped=false" || echo "bumped=true") >> $GITHUB_OUTPUT
echo "current-version=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
- name: Push changes to GitHub
uses: ad-m/github-push-action@master
with:
Expand Down

0 comments on commit 0650ca8

Please sign in to comment.