From ee6dc3e9f5b0a2cbd2c6b87ec57336b08ff6a5bd Mon Sep 17 00:00:00 2001 From: "damian.czajkowski" Date: Sat, 11 Jul 2026 14:01:48 +0200 Subject: [PATCH 1/2] build: fix repo URLs and pre-release tag handling in git-cliff config --- cliff.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cliff.toml b/cliff.toml index 2d5ebe7d..114f179b 100644 --- a/cliff.toml +++ b/cliff.toml @@ -8,7 +8,7 @@ header = """# CHANGELOG All notable unreleased changes to this project will be documented in this file. -For released versions, see the [Releases](https://github.com/mirumee/ariadne/releases) page. +For released versions, see the [Releases](https://github.com/mirumee/ariadne-codegen/releases) page. """ # Template produces two zones: @@ -35,25 +35,25 @@ body = """ {%- if non_breaking and group != "_misc" %} ### {{ group }} {% for commit in non_breaking -%} -- {{ commit.message | upper_first | trim }}{% if commit.remote.username %} (by @{{ commit.remote.username }}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ commit.remote.pr_number }}){% endif %}){% endif %} +- {{ commit.message | upper_first | trim }}{% if commit.remote.username %} (by @{{ commit.remote.username }}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne-codegen/pull/{{ commit.remote.pr_number }}){% endif %}){% endif %} {% endfor %} {%- endif -%} {% endfor %} {% if version %} ## What's Changed {% for commit in commits -%} -* {{ commit.message | upper_first | trim }}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ commit.remote.pr_number }}){% endif %} +* {{ commit.message | upper_first | trim }}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/mirumee/ariadne-codegen/pull/{{ commit.remote.pr_number }}){% endif %} {% endfor %} {%- if github.contributors is defined -%} {%- set new_contributors = github.contributors | filter(attribute="is_first_time", value=true) -%} {%- if new_contributors | length != 0 %} ### New Contributors {% for contributor in new_contributors -%} -* @{{ contributor.username }} made their first contribution{% if contributor.pr_number %} in [#{{ contributor.pr_number }}](https://github.com/mirumee/ariadne/pull/{{ contributor.pr_number }}){% endif %} +* @{{ contributor.username }} made their first contribution{% if contributor.pr_number %} in [#{{ contributor.pr_number }}](https://github.com/mirumee/ariadne-codegen/pull/{{ contributor.pr_number }}){% endif %} {% endfor %} {%- endif -%} {%- endif %} -**Full Changelog**: https://github.com/mirumee/ariadne/compare/{{ previous.version }}...{{ version }} +**Full Changelog**: https://github.com/mirumee/ariadne-codegen/compare/{{ previous.version }}...{{ version }} {% endif -%} """ trim = true @@ -73,7 +73,7 @@ sort_commits = "oldest" tag_pattern = "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$" # Skip pre-release tags – their commits are folded into the next stable release skip_tags = "\\.(rc|dev)[0-9]*$" -ignore_tags = "\\.(b|beta|alpha)[0-9]*$" +ignore_tags = "\\.(a|b|alpha|beta)[0-9]*$" commit_parsers = [ { message = "^feat", group = "✨ New Features" }, From cfa295c7225729a8fb8f22a3c043394b0c3e43f3 Mon Sep 17 00:00:00 2001 From: "damian.czajkowski" Date: Sat, 11 Jul 2026 14:01:56 +0200 Subject: [PATCH 2/2] ci: generate correct release notes for pre-release tags --- .github/workflows/prepare_release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prepare_release.yml b/.github/workflows/prepare_release.yml index 8649a189..c27589a8 100644 --- a/.github/workflows/prepare_release.yml +++ b/.github/workflows/prepare_release.yml @@ -29,12 +29,25 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Determine release notes options + id: relopts + run: | + # Pre-release tags (e.g. 0.19.a1, 0.19.rc1) are excluded from cliff.toml's + # tag_pattern, so `--latest` would resolve to the previous stable tag. For + # those, generate notes for the unreleased range and label them with the tag. + if [[ "${{ github.ref_name }}" =~ (a|b|rc|alpha|beta|dev)[0-9]*$ ]]; then + echo "args=--unreleased --tag ${{ github.ref_name }} --strip all" >> "$GITHUB_OUTPUT" + echo "prerelease=true" >> "$GITHUB_OUTPUT" + else + echo "args=--latest --strip all" >> "$GITHUB_OUTPUT" + echo "prerelease=false" >> "$GITHUB_OUTPUT" + fi - name: Generate release notes id: release-notes uses: orhun/git-cliff-action@v4 with: config: cliff.toml - args: --latest --strip all + args: ${{ steps.relopts.outputs.args }} env: OUTPUT: RELEASE_NOTES.md GITHUB_REPO: ${{ github.repository }} @@ -51,6 +64,7 @@ jobs: files: | ./dist/* draft: true + prerelease: ${{ steps.relopts.outputs.prerelease }} body_path: RELEASE_NOTES.md - name: Summary run: |