diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5d6d5b8..fc1a5fd 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -24,8 +24,13 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add package.json - git commit -m "Update package.json with new nearfs cid [skip ci]" - git push origin HEAD:main + # Check if there are changes to commit + if ! git diff --cached --quiet; then + git commit -m "Update package.json with new nearfs cid [skip ci]" + git push origin HEAD:main + else + echo "No changes to commit." + fi - name: Publish to NPM run: npm publish env: