From 52e8e295d748fdb2b36ebf2b585c98954b8dbe9d Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:24:30 +0800 Subject: [PATCH 1/9] opt:use git cliff {{branch}} variable --- .github/workflows/Release-all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Release-all.yml b/.github/workflows/Release-all.yml index c132a5d2e..40fa49d33 100644 --- a/.github/workflows/Release-all.yml +++ b/.github/workflows/Release-all.yml @@ -170,6 +170,7 @@ jobs: id: build_changelog run: | npm install git-cliff -g + git-cliff --context git-cliff ${{ steps.changelogTags.outputs.prev_tag }}..HEAD -o changelog.txt - name: Get changelog.txt run: | From 4a1df4fe845b2ca64c14e83e7966656f389f70f1 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:25:33 +0800 Subject: [PATCH 2/9] opt:use git cliff {{branch}} variable --- cliff.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cliff.toml b/cliff.toml index 70b99af52..78e8b8e78 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,6 +14,8 @@ Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]... For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng). +Build on branch: {{branch}} + """ # template for the changelog body # https://keats.github.io/tera/docs/#introduction From e504787176d0bb8178a31daff7eb08a3027f1aa9 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:41:26 +0800 Subject: [PATCH 3/9] opt:use git cliff {{branch}} variable --- .github/workflows/Release-all.yml | 11 +++++++---- cliff.toml | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Release-all.yml b/.github/workflows/Release-all.yml index 40fa49d33..5a798d886 100644 --- a/.github/workflows/Release-all.yml +++ b/.github/workflows/Release-all.yml @@ -168,10 +168,13 @@ jobs: echo "newTag=v${{ env.version }}-${{ env.versionSuffix }}.${{ steps.shortSHA.outputs.sha_short }}" >> $GITHUB_OUTPUT - name: Build Changelog id: build_changelog - run: | - npm install git-cliff -g - git-cliff --context - git-cliff ${{ steps.changelogTags.outputs.prev_tag }}..HEAD -o changelog.txt + uses: orhun/git-cliff-action@v4 + with: + config: cliff.toml + args: ${{ steps.changelogTags.outputs.prev_tag }}..HEAD + env: + OUTPUT: changelog.txt + - name: Get changelog.txt run: | # HEREDOC must be quoted to avoid Bash substitution diff --git a/cliff.toml b/cliff.toml index 78e8b8e78..70c8390b8 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,7 +14,6 @@ Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]... For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng). -Build on branch: {{branch}} """ # template for the changelog body From 6b2bc3df36284750184f53b78ec9b74be0fb7b23 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:44:17 +0800 Subject: [PATCH 4/9] opt:use git cliff {{branch}} variable --- cliff.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/cliff.toml b/cliff.toml index 70c8390b8..83c0405d6 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,6 +14,7 @@ Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]... For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng). +Based on branch: ${{ remote.github.ref_name }} """ # template for the changelog body From 1a802e26a350dba4cb7e4ad9c24e43faba62b2c4 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:46:31 +0800 Subject: [PATCH 5/9] opt:use git cliff {{branch}} variable --- .github/workflows/Release-all.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/Release-all.yml b/.github/workflows/Release-all.yml index 5a798d886..f956767d4 100644 --- a/.github/workflows/Release-all.yml +++ b/.github/workflows/Release-all.yml @@ -175,13 +175,6 @@ jobs: env: OUTPUT: changelog.txt - - name: Get changelog.txt - run: | - # HEREDOC must be quoted to avoid Bash substitution - # append the branch name to the changelog - cat <<'HEREDOC' >> changelog.txt - Based on branch: ${{ github.ref_name }} - HEREDOC - name: Print changelog.txt run: | cat changelog.txt From 70801e613b523393e9f59617f107f10cd7db429b Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:52:39 +0800 Subject: [PATCH 6/9] opt:use git cliff {{branch}} variable --- .github/workflows/Release-all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Release-all.yml b/.github/workflows/Release-all.yml index f956767d4..68b230779 100644 --- a/.github/workflows/Release-all.yml +++ b/.github/workflows/Release-all.yml @@ -174,6 +174,7 @@ jobs: args: ${{ steps.changelogTags.outputs.prev_tag }}..HEAD env: OUTPUT: changelog.txt + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print changelog.txt run: | From 785809542e0190a586f4e418f65b334cecef084c Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:55:21 +0800 Subject: [PATCH 7/9] opt:use git cliff {{branch}} variable --- cliff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cliff.toml b/cliff.toml index 83c0405d6..ae8dc941d 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,7 +14,7 @@ Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]... For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng). -Based on branch: ${{ remote.github.ref_name }} +Based on branch: ${{ remote.github.ref }} """ # template for the changelog body From 2aa9a4e1ac63df8f154e8de700046e60ab55c859 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:57:56 +0800 Subject: [PATCH 8/9] opt:use git cliff {{branch}} variable --- cliff.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/cliff.toml b/cliff.toml index ae8dc941d..70b99af52 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,8 +14,6 @@ Filename pattern: GoldenDict-ng-[version]-[Qt version]-[system name]... For Linux, the released version is on Flathub → [io.github.xiaoyifang.goldendict_ng](https://flathub.org/apps/io.github.xiaoyifang.goldendict_ng). -Based on branch: ${{ remote.github.ref }} - """ # template for the changelog body # https://keats.github.io/tera/docs/#introduction From 3808a2b0d43f492f054686c173b78d1bdf0cb148 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Feb 2025 16:59:14 +0800 Subject: [PATCH 9/9] opt:use git cliff {{branch}} variable --- .github/workflows/Release-all.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Release-all.yml b/.github/workflows/Release-all.yml index 68b230779..2fe72ae40 100644 --- a/.github/workflows/Release-all.yml +++ b/.github/workflows/Release-all.yml @@ -175,7 +175,13 @@ jobs: env: OUTPUT: changelog.txt GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Get changelog.txt + run: | + # HEREDOC must be quoted to avoid Bash substitution + # append the branch name to the changelog + cat <<'HEREDOC' >> changelog.txt + Based on branch: ${{ github.ref_name }} + HEREDOC - name: Print changelog.txt run: | cat changelog.txt