Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -51,6 +64,7 @@ jobs:
files: |
./dist/*
draft: true
prerelease: ${{ steps.relopts.outputs.prerelease }}
body_path: RELEASE_NOTES.md
- name: Summary
run: |
Expand Down
12 changes: 6 additions & 6 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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" },
Expand Down
Loading