From 1877055672fb549c5d753a2acc950df227f24dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=B0=8F=E8=92=99?= Date: Tue, 4 Jun 2024 11:44:49 +0800 Subject: [PATCH] fix error --- .github/workflows/python-package.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 631e5e53..e294a1bb 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,18 +28,28 @@ jobs: run: | python update_version.py + - name: Verify version.py + run: | + ls -l magic_pdf/libs/version.py + cat magic_pdf/libs/version.py + - name: Commit changes run: | git config --local user.email "moe@myhloli.com" git config --local user.name "myhloli" git add magic_pdf/libs/version.py - git commit -m "Update version.py with new version" + if git diff-index --quiet HEAD; then + echo "No changes to commit" + else + git commit -m "Update version.py with new version" + fi - name: Push changes + if: always() # 确保始终运行此步骤 env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git push + git push origin main build: runs-on: ubuntu-latest