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 2b5bda0 commit f8fb7d2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/pubish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -21,18 +21,21 @@ jobs:
- name: Install Dependencies
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
- 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
- name: Create .npmrc file
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: Run Build
run: npm run build

- name: Run Publish
run: npm run pub
run: npm publish
env:
# 设置环境变量,如需要的 API 密钥、令牌等
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f8fb7d2

Please sign in to comment.