Skip to content

Commit 6179940

Browse files
committed
fix: 优化action流程
1 parent 93a763a commit 6179940

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,21 @@ jobs:
2222
# this is a built-in strategy in release-please, see "Action Inputs"
2323
# for more options
2424
release-type: node
25+
# The logic below handles the npm publication:
26+
- uses: actions/checkout@v4
27+
# these if statements ensure that a publication only occurs when
28+
# a new release is created:
29+
if: ${{ steps.release.outputs.release_created }}
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
registry-url: 'https://registry.npmjs.org'
34+
if: ${{ steps.release.outputs.release_created }}
35+
- run: npm install
36+
if: ${{ steps.release.outputs.release_created }}
37+
- run: npm run build
38+
if: ${{ steps.release.outputs.release_created }}
39+
- run: npm publish
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42+
if: ${{ steps.release.outputs.release_created }}

.github/workflows/release-tag.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)