From 16f5adca52942490891f39e81c4a1ff79428f760 Mon Sep 17 00:00:00 2001 From: magine Date: Tue, 2 Apr 2024 17:34:02 +0800 Subject: [PATCH] ci: fix repo address in cliff (#572) --- .github/workflows/auto-release.yml | 5 +---- cliff.toml | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index c70788d5..a0cb200a 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -236,12 +236,9 @@ jobs: id: git-cliff with: config: cliff.toml - args: -vv --latest --strip header - env: - OUTPUT: CHANGES.md + args: "-vv --strip header ${{ needs.gen_version.outputs.version == 'prerelease' && '--unreleased' || '--latest' }}" - uses: actions/download-artifact@v3 - - name: Display fetched artifacts run: ls -R diff --git a/cliff.toml b/cliff.toml index 76d1a06c..451cd80b 100644 --- a/cliff.toml +++ b/cliff.toml @@ -13,7 +13,7 @@ body = """ --- {% if version %}\ {% if previous.version %}\ - ## [{{ version | trim_start_matches(pat="v") }}]($REPO/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} + ## [{{ version | trim_start_matches(pat="v") }}](/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} {% else %}\ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} {% endif %}\ @@ -26,14 +26,14 @@ body = """ | filter(attribute="scope") | sort(attribute="scope") %} - **({{commit.scope}})**{% if commit.breaking %} [**breaking**]{% endif %} \ - {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }} + {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})) - {{ commit.author.name }} {%- endfor -%} {% raw %}\n{% endraw %}\ {%- for commit in commits %} {%- if commit.scope -%} {% else -%} - {% if commit.breaking %} [**breaking**]{% endif %}\ - {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }} + {{ commit.message|trim }} - ([{{ commit.id | truncate(length=7, end="") }}](/commit/{{ commit.id }})) - {{ commit.author.name }} {% endif -%} {% endfor -%} {% endfor %}\n @@ -46,7 +46,7 @@ footer = """ trim = true # postprocessors postprocessors = [ - # { pattern = '', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL + { pattern = '', replace = "https://github.com/RingsNetwork/rings" }, ] [git]