2 Commits

Author SHA1 Message Date
2ff7b6d295 更新生成变更日志步骤,移除 TAG_NAME 环境变量定义,直接使用 github.ref_name 作为标签名称
Some checks failed
Release to Liteyuki Gitea / release (push) Failing after 14s
Publish to Liteyuki PyPI / Upload release to PyPI (push) Successful in 16s
2025-04-29 01:03:57 +08:00
d4e0541ad6 移动 TAG_NAME 环境变量定义到生成变更日志和创建 Gitea Release 步骤中,以确保正确使用
Some checks failed
Release to Liteyuki Gitea / release (push) Failing after 11s
Publish to Liteyuki PyPI / Upload release to PyPI (push) Successful in 16s
2025-04-29 01:01:46 +08:00

View File

@@ -7,7 +7,7 @@ on:
env:
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
jobs:
release:
@@ -18,12 +18,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Generate Changelog
run: |
wget -O /usr/bin/changelog https://gitea.com/gitea/changelog/releases/download/v1.0.0/changelog-1.0.0-linux-amd64
chmod +x /usr/bin/changelog
changelog -m=$TAG_NAME -c=./changelog.yaml
changelog -m=${{ github.ref_name }}" -c=./changelog.yaml
# 创建 Gitea Release
- name: Create Gitea Release
@@ -34,7 +33,7 @@ jobs:
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'"$TAG_NAME"'",
"tag_name": "'"${{ github.ref_name }}"'",
"target_commitish": "main",
"name": "'"$TAG_NAME"'",
"body": "'"waiting..."'",