Skip to content

Commit

Permalink
ci: handle no changes in commit step
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrani authored Aug 16, 2023
1 parent 0170e2b commit 438b84d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ jobs:
run: |
git config --local user.name "Github Action"
git config user.email "[email protected]"
# Check for changes
if ! git diff-index --quiet HEAD --; then
git commit -a -m "docs: bump version to ${{ steps.semver.outputs.git_tag }}"
git tag ${{ steps.semver.outputs.git_tag }}
else
echo "No changes detected. Skipping commit and tag."
fi
git diff --quiet || git commit -a -m "docs: bump version to ${{ steps.semver.outputs.git_tag }}"
git tag ${{ steps.semver.outputs.git_tag }}
- name: Push Changes
if: steps.semver.outputs.version != ''
Expand Down

0 comments on commit 438b84d

Please sign in to comment.