Skip to content

Commit

Permalink
remove specialized cliff config
Browse files Browse the repository at this point in the history
  • Loading branch information
rarescosma committed Sep 25, 2024
1 parent 2a4d3fd commit 87a28e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ jobs:
echo "version does not match Cargo.toml" >&2
exit 1
fi
- name: Prepare cliff config
run: |
sed -i 's#$REPO#${{ github.server_url }}/${{ github.repository }}#g' cliff-gh.toml
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff-gh.toml
config: cliff.toml
args: --latest --strip all
env:
REPO_PREFIX: ${{ github.server_url }}/${{ github.repository }}/
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
29 changes: 0 additions & 29 deletions cliff-gh.toml

This file was deleted.

5 changes: 3 additions & 2 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[changelog]
body = """
{% set repo_prefix = get_env(name="REPO_PREFIX", default="") %}
{% if version %}\
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
Expand All @@ -9,13 +10,13 @@ body = """
{% if previous.version and version %}
### Diff
[{{ previous.version }}...{{ version }}](compare/{{ previous.version }}...{{ version }})
[{{ previous.version }}...{{ version }}]({{repo_prefix}}compare/{{ previous.version }}...{{ version }})
{% endif %}\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | split(pat="\n") | first | trim }} [#{{ commit.id | truncate(length=7, end="") }}](commit/{{ commit.id }})\
- {{ commit.message | split(pat="\n") | first | trim }} [#{{ commit.id | truncate(length=7, end="") }}]({{repo_prefix}}commit/{{ commit.id }})\
{% endfor %}
{% endfor %}\n
"""
Expand Down

0 comments on commit 87a28e5

Please sign in to comment.