From 706bd7110824f7f40ee3cd9c9f392442dbb0779f Mon Sep 17 00:00:00 2001 From: Mathious6 <91007976+Mathious6@users.noreply.github.com> Date: Mon, 31 Aug 2026 18:41:05 +0200 Subject: [PATCH] ci(release): generate release notes --- .github/release.yml | 16 ++++++++++++++++ .github/workflows/release.yml | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..a28ff6c --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,16 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - dependabot[bot] + categories: + - title: Features + labels: + - enhancement + - title: Fixes + labels: + - bug + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4989877..dcf7714 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -206,6 +206,20 @@ jobs: export RELEASE_ID sh scripts/validate-release.sh + - name: generate release notes + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + TAG: ${{ github.ref_name }} + run: | + RELEASE_ID=$(gh api --paginate "repos/$REPO/releases?per_page=100" --jq ".[] | select(.tag_name == \"$TAG\" and .draft == true) | .id" | head -n 1) + test -n "$RELEASE_ID" + GENERATED_NOTES=$(gh api -X POST "repos/$REPO/releases/generate-notes" -f tag_name="$TAG" --jq .body) + test -n "$GENERATED_NOTES" + PLATFORM_NOTICE='macOS DMGs are Developer ID signed and notarized by Apple. The Windows NSIS setup wizard is unsigned and may trigger SmartScreen; choose More info, then Run anyway.' + jq -n --arg notice "$PLATFORM_NOTICE" --arg notes "$GENERATED_NOTES" '{body: ($notice + "\n\n" + $notes)}' | + gh api -X PATCH "repos/$REPO/releases/$RELEASE_ID" --input - + - name: publish release env: GH_TOKEN: ${{ github.token }}