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 3041d32 commit 04ca06f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/pubish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ jobs:
run: npm install

- name: Update Version
run: npm version patch
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
- name: Run Build
run: npm run build
Expand All @@ -31,12 +35,4 @@ jobs:
run: npm run pub
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 add package.json
git commit -m "Update package version"
git push --follow-tags
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 04ca06f

Please sign in to comment.