From 7b900d9f1470cb04383c49c1d632f2b35e8572c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Nussbaumer?= Date: Tue, 9 Apr 2024 11:59:36 +0200 Subject: [PATCH] build(ci): use git-cliff release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Clément Nussbaumer --- .github/workflows/release.yml | 13 ++++++++++++- .gitignore | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 813939e4..8961607a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v5 with: @@ -19,10 +21,19 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Generate a changelog + uses: orhun/git-cliff-action@v3 + id: git-cliff + with: + config: cliff.toml + args: -v --latest --strip header + env: + GITHUB_REPO: $GITHUB_REPOSITORY + OUTPUT: CHANGES.md - name: GoReleaser uses: goreleaser/goreleaser-action@v5 with: version: latest - args: release --rm-dist + args: release --clean --release-notes=CHANGES.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 849ddff3..1236ab48 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dist/ +CHANGES.md