✨ 添加 changelog.yaml 文件以配置变更日志生成
This commit is contained in:
parent
62507822ba
commit
e6f6a4a360
22
.github/workflows/liteyuki-gitea-release.yaml
vendored
22
.github/workflows/liteyuki-gitea-release.yaml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||||
|
TAG_NAME: $(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -17,12 +18,18 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
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
|
||||||
|
|
||||||
# 创建 Gitea Release
|
# 创建 Gitea Release
|
||||||
- name: Create Gitea Release
|
- name: Create Gitea Release
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
|
||||||
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -33,15 +40,4 @@ jobs:
|
|||||||
"body": "'"waiting..."'",
|
"body": "'"waiting..."'",
|
||||||
"draft": false,
|
"draft": false,
|
||||||
"prerelease": false
|
"prerelease": false
|
||||||
}'
|
}'
|
||||||
|
|
||||||
|
|
||||||
- name: Trigger Changelog Workflow
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
|
||||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
|
||||||
$GITEA_API_URL/repos/${{ github.repository }}/dispatches \
|
|
||||||
-d '{"event_type": "generate_changelog"}'
|
|
30
changelog.yaml
Normal file
30
changelog.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
repo: bot/yukilog
|
||||||
|
|
||||||
|
service: gitea
|
||||||
|
|
||||||
|
base-url: https://git.liteyuki.icu
|
||||||
|
|
||||||
|
# Changelog groups and which labeled PRs to add to each group
|
||||||
|
groups:
|
||||||
|
-
|
||||||
|
name: FEATURES
|
||||||
|
labels:
|
||||||
|
- feature
|
||||||
|
-
|
||||||
|
name: BUGFIXES
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
-
|
||||||
|
name: ENHANCEMENTS
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
-
|
||||||
|
name: BUILD
|
||||||
|
labels:
|
||||||
|
- build
|
||||||
|
-
|
||||||
|
name: MISC
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# regex indicating which labels to skip for the changelog
|
||||||
|
skip-labels: skip-changelog
|
Loading…
x
Reference in New Issue
Block a user