Skip to content

Commit

Permalink
chore: update publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping committed Dec 13, 2023
1 parent 27b9b25 commit 1fe3fc3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/pubish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ jobs:
run: npm install

- name: Update Version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
npm version patch -m "Upgrade to %s" # 可以使用 major、minor 或 patch
git push --follow-tags
run: npm version patch -m "Upgrade to %s" # 可以使用 major、minor 或 patch

- name: Run Build
run: npm run build
Expand All @@ -36,3 +32,9 @@ jobs:
env:
# 设置环境变量,如需要的 API 密钥、令牌等
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Save Version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git push --follow-tags

0 comments on commit 1fe3fc3

Please sign in to comment.