From d8b59cfdf05591504c8bb224392f86000fbc5c87 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 | 12 +++++++++++- .gitignore | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 813939e4..ee70cdbc 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,18 @@ 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 --github-repo "$GITHUB_REPOSITORY" --strip header + env: + 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