Skip to content

Commit 91e827c

Browse files
committed
chore(github): 增加 git tags 强制同步脚本
1 parent 12ceaaa commit 91e827c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ jobs:
99
publish-npm:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0 # 获取完整历史
15+
clean: true # 清理工作目录
1316
- uses: actions/setup-node@v1
1417
with:
1518
node-version: 18
@@ -19,6 +22,10 @@ jobs:
1922
- run: npm install pnpm -g
2023
- run: pnpm install
2124
- run: pnpm build
25+
- name: Sync git tags
26+
run: |
27+
git fetch --prune --prune-tags # 清理已删除的远程标签
28+
git fetch --tags -f # 强制更新所有标签
2229
- name: Publish with Lerna
2330
env:
2431
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)