From e6f6a4a3602b7d2e357585bdb41d8f96158fbff5 Mon Sep 17 00:00:00 2001 From: Snowykami Date: Tue, 29 Apr 2025 00:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=B7=BB=E5=8A=A0=20changelog.yaml?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=E4=BB=A5=E9=85=8D=E7=BD=AE=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=97=A5=E5=BF=97=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/liteyuki-gitea-release.yaml | 22 ++++++-------- changelog.yaml | 30 +++++++++++++++++++ 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 changelog.yaml diff --git a/.github/workflows/liteyuki-gitea-release.yaml b/.github/workflows/liteyuki-gitea-release.yaml index 720e2fc..148b16d 100644 --- a/.github/workflows/liteyuki-gitea-release.yaml +++ b/.github/workflows/liteyuki-gitea-release.yaml @@ -7,6 +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: @@ -17,12 +18,18 @@ 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 + # 创建 Gitea Release - name: Create Gitea Release env: GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }} run: | - TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///') curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \ -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: application/json" \ @@ -33,15 +40,4 @@ jobs: "body": "'"waiting..."'", "draft": 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"}' \ No newline at end of file + }' \ No newline at end of file diff --git a/changelog.yaml b/changelog.yaml new file mode 100644 index 0000000..23d4b61 --- /dev/null +++ b/changelog.yaml @@ -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 \ No newline at end of file