From d2d42d632653aed06db3eff73c62d8dd6ac50686 Mon Sep 17 00:00:00 2001 From: Lukasz Mierzwa Date: Fri, 22 Mar 2024 16:46:36 +0000 Subject: [PATCH] Fix changelog generation --- .github/workflows/compile.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 89a71179..1afe4e40 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -44,10 +44,19 @@ jobs: with: args: release --clean --skip=validate --skip=sign --skip=sbom --skip=publish --snapshot + - name: Extract release changelog + if: startsWith(github.ref, 'refs/tags/') + id: changelog + uses: sean0x42/markdown-extract@v2 + with: + file: docs/changelog.md + pattern: "${{ github.ref_name }}" + no-print-matched-heading: true + - name: Release binaries if: startsWith(github.ref, 'refs/tags/') uses: goreleaser/goreleaser-action@v5 with: - args: release --clean --release-notes docs/changelog.md + args: release --clean --release-notes <(printf "${{ steps.changelog.outputs.markdown }}") env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}