From 438b84d866d6e6484b4d0e4379b3495b6b250033 Mon Sep 17 00:00:00 2001 From: charles Date: Wed, 16 Aug 2023 13:00:16 -0600 Subject: [PATCH] ci: handle no changes in commit step --- .github/workflows/release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbff879a..15383e96 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,14 +28,8 @@ jobs: run: | git config --local user.name "Github Action" git config user.email "action@github.com" - - # 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 != ''