Skip to content

Commit 4f2127b

Browse files
committed
ci: Fix git-cliff download URL (use gh API for versioned asset)
1 parent 583691b commit 4f2127b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release-packages.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ jobs:
2424

2525
- name: Install git-cliff
2626
run: |
27-
curl -sL https://github.com/orhun/git-cliff/releases/latest/download/git-cliff-x86_64-unknown-linux-gnu.tar.gz \
28-
| tar -xz -C /usr/local/bin git-cliff
27+
URL=$(gh release view --repo orhun/git-cliff --json assets \
28+
--jq '.assets[] | select(.name | test("x86_64-unknown-linux-gnu.tar.gz$")) | .url')
29+
curl -sL "$URL" | tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/git-cliff'
30+
env:
31+
GH_TOKEN: ${{ github.token }}
2932

3033
- name: Generate changelog
3134
run: |

0 commit comments

Comments
 (0)