From e3e36cd15888e0f97fc20e8beb7fafe7ab160b46 Mon Sep 17 00:00:00 2001 From: Felitendo Date: Fri, 18 Sep 2026 09:02:47 +0200 Subject: [PATCH] ci: put real changelogs in releases --- .github/workflows/upstream-release.yml | 38 ++++++++++++++++++++++++-- README.md | 3 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upstream-release.yml b/.github/workflows/upstream-release.yml index e21d209..8a636b5 100644 --- a/.github/workflows/upstream-release.yml +++ b/.github/workflows/upstream-release.yml @@ -100,7 +100,10 @@ jobs: needs: [detect, build] runs-on: ubuntu-latest steps: + # The whole history: the release notes are the commits since the last one. - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Record the upstream release we build against env: @@ -200,18 +203,47 @@ jobs: }' "$patch" done )" + patch_count="$(printf '%s\n' "$patches" | grep -c '^- ' || true)" + + # What changed here since the last release, as its commit subjects. + # The bump of upstream.txt is left out: the line above already says + # which Modrinth App this is built from. + previous="$(gh release view --json tagName --jq .tagName 2>/dev/null || true)" + changes="" + if [ -n "$previous" ]; then + changes="$( + git log --reverse --no-merges --pretty='- %s' "$previous..HEAD" | + grep -v '^- Track upstream ' || true + )" + fi + if [ -z "$changes" ]; then + changes="- Rebuilt on Modrinth App $UPSTREAM, with the patches unchanged." + fi + if [ -n "$previous" ]; then + changes="$changes + + [Everything since $previous](https://github.com/$GITHUB_REPOSITORY/compare/$previous...$TAG)" + fi + notes="$(cat < + The $patch_count patches in this build $patches + + It keeps using the same data directory as the official Modrinth App, so instances, settings and accounts carry over. Do not run both at the same time. - - See the upstream release notes for everything else that changed. EOF )" # The tag goes on the commit that was built, not on whatever main is diff --git a/README.md b/README.md index 0bc10a2..5245cc8 100644 --- a/README.md +++ b/README.md @@ -286,7 +286,8 @@ scripts/prepare.sh - **Upstream release** (`.github/workflows/upstream-release.yml`) runs daily. If Modrinth has published a newer release than `upstream.txt`, it rebases the patches onto it, rebuilds and — only if every platform built and every check passed — commits the bump, tags it with the upstream version and - publishes a release with the installers. + publishes a release with the installers. Its notes are the commits since the last release, with + the patch list folded away underneath. - **Revisions** come from the same run: when `patches/` or `scripts/` changed since the last release of that upstream version, it is released again as `v0.21.2-2`, `v0.21.2-3` and so on. The app and installers still carry the upstream version: RPM and the Windows installers do not