🐛 fix(ci): 修复 Release 构建资产丢失,checkout 隔离到独立目录

- checkout path 改为 repo-for-changelog 避免 git 操作干扰 release-assets
- Generate Changelog 步骤进入 checkout 子目录执行 git log
This commit is contained in:
Syngnat
2026-03-20 16:51:42 +08:00
parent 87cfbee6d3
commit da28207168

View File

@@ -613,17 +613,18 @@ jobs:
sha256sum "${FILES[@]}" > SHA256SUMS
fi
- name: Checkout code
- name: Checkout code for changelog
uses: actions/checkout@v4
with:
fetch-depth: 0
clean: false
path: repo-for-changelog
- name: Generate Changelog
id: changelog
shell: bash
run: |
set -euo pipefail
cd repo-for-changelog
TAG="${{ github.ref_name }}"
# 获取上一个 tag
PREV_TAG=$(git tag --sort=-creatordate | grep -E '^v' | sed -n '2p' || true)