ci(publish-npm): add debug output and fault tolerance to version bump step

Add git status and git diff for debugging visibility during release.

Change git add to -A and append || true to commit/push to prevent workflow failures when there are no changes or push issues.

Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
This commit is contained in:
林凯90331 2026-05-14 18:36:52 +08:00
parent ca59e79568
commit 6a55dcb38e

View File

@ -49,9 +49,11 @@ jobs:
# Commit and push version bump
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package.json scripts/defines.ts
git commit -m "chore(release): bump version to ${VERSION}"
git push origin HEAD
git status
git diff
git add -A
git commit -m "chore(release): bump version to ${VERSION}" || true
git push origin HEAD || true
- name: Create or recreate tag
if: ${{ github.event_name == 'workflow_dispatch' }}