diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 813939e..1e03be5 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 --github-repo --strip header + env: + GITHUB_REPO: ${{ env.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 849ddff..1236ab4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ dist/ +CHANGES.md