Explorar o código

chore: update publish.yml workflow

pointhalo %!s(int64=3) %!d(string=hai) anos
pai
achega
4913099edd
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      .github/workflows/publish.yml

+ 7 - 2
.github/workflows/publish.yml

@@ -33,8 +33,13 @@ jobs:
               run: |
                   git config --global user.name 'semi-bot'
                   git config --global user.email '[email protected]'
-                  git add .
-                  git commit --no-verify -m "chore: publish ${{ env.RELEASE_VERSION }}"
+                  if [ -n "$(git status --porcelain)" ]; then
+                    echo "there are changes";
+                    git add .
+                    git commit --no-verify -m "chore: publish ${{ env.RELEASE_VERSION }}"
+                  else
+                    echo "no changes";
+                  fi
                   npm config set registry=https://registry.npmjs.org/
                   npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
                   npm whoami