From f3deb6c991da358532d804410e78604cdc0d0506 Mon Sep 17 00:00:00 2001 From: RRosio Date: Thu, 12 Dec 2024 18:49:28 -0800 Subject: [PATCH] add github identity and ensure hatch version update --- .github/workflows/bump-version.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 98a64dd..f76c1fd 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -41,10 +41,24 @@ jobs: run: | hatch version ${{ inputs.version }} + - name: Check only changes in package.json + run: | + git diff + git diff --exit-code -- . ':(exclude)package.json' || ( + echo "Unexpected changes detected." + exit 1 + ) + echo "No unexpected changes detected." + + - name: Configure Git + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor}}@users.noreply.github.com" + - name: Commit and push version bump run: | git commit -am "Bump version to ${{ inputs.version }}" || ( - echo "Error: No changes detected during version bump. Ensure the version is updated in the project files." + echo "Error: git commit failed." exit 1 ) git push || ( @@ -54,5 +68,5 @@ jobs: - name: Create and push tags run: | - git tag -a "v${{ inputs.version }}" -m "Version ${{ inputs.version }}" + git tag -a "v${{ inputs.version }}" -m "Release version ${{ inputs.version }}" git push origin "v${{ inputs.version }}"