From 2032a55a2e7a76b12f13fd1dfe8b9e44fcf84e94 Mon Sep 17 00:00:00 2001 From: Benjamin Heimann Date: Tue, 16 Dec 2025 10:19:55 +0100 Subject: [PATCH] docs(readme): add an example how to execute arbitrary git-cliff commands (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(readme): add an example how to execute arbitrary git-cliff commands Add an example to the README that shows how to execute arbitrary git-cliff commands in GitHub Actions via https://github.com/taiki-e/install-action. * Update README.md --------- Co-authored-by: Orhun Parmaksız --- README.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 401680d..ce6c4a7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This action generates a changelog based on your Git history using [git-cliff](ht > > ```yaml > - name: Checkout -> uses: actions/checkout@v4 +> uses: actions/checkout@v6 > with: > fetch-depth: 0 > ``` @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -86,7 +86,7 @@ jobs: release_body: ${{ steps.git-cliff.outputs.content }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -137,7 +137,7 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -163,6 +163,33 @@ jobs: Please note that you need to change the `` to the branch name that you want to push. +#### Run arbitrary git-cliff commands + +If you want more flexibility, you can install `git-cliff` via [taiki-e/install-action](https://github.com/taiki-e/install-action#example-workflow) and then run any `git-cliff` commands. + +For example, you can use the command `git-cliff --bumped-version` to determine the next release version: + +```yml +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Install git-cliff + uses: taiki-e/install-action@git-cliff + + - name: Determine release version + run: | + release_version=$(git-cliff --bumped-version) + echo "Next release version is $release_version" +``` + ## License Licensed under either of [Apache License Version 2.0](./LICENSE-APACHE) or [The MIT License](./LICENSE-MIT) at your option.