mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
Update release-auto-commit.yml
This commit is contained in:
7
.github/workflows/release-auto-commit.yml
vendored
7
.github/workflows/release-auto-commit.yml
vendored
@@ -19,13 +19,8 @@ jobs:
|
|||||||
- name: Get previous release tag
|
- name: Get previous release tag
|
||||||
id: prev_tag
|
id: prev_tag
|
||||||
run: |
|
run: |
|
||||||
# 若没有历史 Release,默认取仓库第一个 Commit 并标记为初始版本
|
|
||||||
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||||
# 若为首次 Release(PREV_TAG 是 Commit 哈希而非标签),显式标记为初始版本
|
echo "prev_tag=${PREV_TAG}" >> $GITHUB_OUTPUT
|
||||||
if ! git tag --list | grep -q "^$PREV_TAG$"; then
|
|
||||||
PREV_TAG="initial-commit"
|
|
||||||
fi
|
|
||||||
echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# 3. 生成当前 Release 与上一个版本间的 Commit 记录(格式:哈希 + 标题)
|
# 3. 生成当前 Release 与上一个版本间的 Commit 记录(格式:哈希 + 标题)
|
||||||
- name: Generate commit log
|
- name: Generate commit log
|
||||||
|
|||||||
Reference in New Issue
Block a user