From 04ca06f0fa98d9fcb87bbe05dc37686078468ae7 Mon Sep 17 00:00:00 2001 From: liujuping Date: Wed, 13 Dec 2023 20:34:58 +0800 Subject: [PATCH] chore: update publish action --- .github/workflows/pubish.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pubish.yml b/.github/workflows/pubish.yml index 492d6ba..b30ab6b 100644 --- a/.github/workflows/pubish.yml +++ b/.github/workflows/pubish.yml @@ -22,7 +22,11 @@ jobs: run: npm install - name: Update Version - run: npm version patch + run: | + git config --local user.email "action@github.com" + 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 @@ -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 "action@github.com" - 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 }} \ No newline at end of file