Skip to content

Commit 9f0c3f4

Browse files
author
litleSnow
committed
fix: 修复自动流水线
1 parent ea79c06 commit 9f0c3f4

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ jobs:
7676
echo "New version: $NEW_VERSION"
7777
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
7878
79-
# Commit version change
80-
git add package.json
81-
git commit -m "chore: bump version to $NEW_VERSION"
79+
# Note: Do not commit version change yet, wait until after successful NPM publish
8280
8381
- name: Build project
8482
run: |
@@ -98,8 +96,11 @@ jobs:
9896
env:
9997
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
10098

101-
- name: Push version commit
99+
- name: Commit and push version change
102100
run: |
101+
# Commit version change after successful NPM publish
102+
git add package.json
103+
git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
103104
git push origin main
104105
105106
- name: Create GitHub Release

0 commit comments

Comments
 (0)