Skip to content

Commit 31fd105

Browse files
authored
自动更新版本号 (#301)
1 parent 92772f2 commit 31fd105

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

.github/workflows/version.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,9 @@ jobs:
4141
NEXT_VERSION="$major.$minor.$patch"
4242
echo "next=$NEXT_VERSION" >> $GITHUB_OUTPUT
4343
44-
- name: Create branch and commit
44+
- name: Bump version
4545
run: |
46-
git config user.name "github-actions[bot]"
47-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
48-
49-
BRANCH="bump-version-${{ steps.version.outputs.next }}"
50-
git checkout -b $BRANCH
51-
52-
# 修改 package.json
5346
jq '.version = "${{ steps.version.outputs.next }}"' package.json > package.tmp && mv package.tmp package.json
54-
git add package.json
55-
git commit -m "chore: bump version to ${{ steps.version.outputs.next }}"
56-
git push origin $BRANCH
5747
5848
- name: Create Pull Request
5949
uses: peter-evans/create-pull-request@v7
@@ -63,4 +53,5 @@ jobs:
6353
body: "Auto bump version to ${{ steps.version.outputs.next }} (detected tag ${{ steps.tag.outputs.current }})"
6454
base: master
6555
branch: bump-version-${{ steps.version.outputs.next }}
56+
commit-message: "chore: bump version to ${{ steps.version.outputs.next }}"
6657
sign-commits: true

0 commit comments

Comments
 (0)