Skip to content

Commit 8fc40c1

Browse files
committed
ci: 优化 NPM 发布 workflow
- 仅在 release published 时触发(避免创建 draft 时误触发) - 移除 cache 配置(无 package-lock.json)
1 parent ce5c01d commit 8fc40c1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Publish to NPM
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
74
release:
8-
types: [created]
5+
types: [published]
96

107
jobs:
118
build-and-publish:
@@ -19,7 +16,6 @@ jobs:
1916
with:
2017
node-version: '20'
2118
registry-url: 'https://registry.npmjs.org'
22-
cache: 'npm'
2319

2420
- name: Install dependencies
2521
run: npm install

0 commit comments

Comments
 (0)