diff --git a/.github/workflows/release-npm-cookie-banner.yaml b/.github/workflows/release-npm-cookie-banner.yaml index 0f7f264b2..061b5076e 100644 --- a/.github/workflows/release-npm-cookie-banner.yaml +++ b/.github/workflows/release-npm-cookie-banner.yaml @@ -62,6 +62,13 @@ jobs: - uses: "actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" # v4 with: subject-path: "packages/cookie-banner/dist/**" + - name: "Extract release notes" + run: | + VERSION="${GITHUB_REF_NAME##*/v}" + awk -v ver="$VERSION" ' + /^## \[/ { if (found) exit; if ($0 ~ "\\[" ver "\\]") found=1 } + found + ' packages/cookie-banner/CHANGELOG.md > release-notes.md - name: "Create GitHub release" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -75,7 +82,7 @@ jobs: gh release create "${GITHUB_REF_NAME}" \ --title "${GITHUB_REF_NAME}" \ - --notes-file packages/cookie-banner/CHANGELOG.md \ + --notes-file release-notes.md \ $PRERELEASE_FLAG \ packages/cookie-banner/sbom.json packages/cookie-banner/checksums.txt - uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f" # v7 diff --git a/.github/workflows/release-npm-n8n-node.yaml b/.github/workflows/release-npm-n8n-node.yaml index 28cfece92..9d44793bc 100644 --- a/.github/workflows/release-npm-n8n-node.yaml +++ b/.github/workflows/release-npm-n8n-node.yaml @@ -62,6 +62,13 @@ jobs: - uses: "actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" # v4 with: subject-path: "packages/n8n-node/dist/**" + - name: "Extract release notes" + run: | + VERSION="${GITHUB_REF_NAME##*/v}" + awk -v ver="$VERSION" ' + /^## \[/ { if (found) exit; if ($0 ~ "\\[" ver "\\]") found=1 } + found + ' packages/n8n-node/CHANGELOG.md > release-notes.md - name: "Create GitHub release" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -75,7 +82,7 @@ jobs: gh release create "${GITHUB_REF_NAME}" \ --title "${GITHUB_REF_NAME}" \ - --notes-file packages/n8n-node/CHANGELOG.md \ + --notes-file release-notes.md \ $PRERELEASE_FLAG \ packages/n8n-node/sbom.json packages/n8n-node/checksums.txt - uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f" # v7 diff --git a/.github/workflows/release-prb.yaml b/.github/workflows/release-prb.yaml index 63245cbcd..333bffff4 100644 --- a/.github/workflows/release-prb.yaml +++ b/.github/workflows/release-prb.yaml @@ -126,6 +126,13 @@ jobs: uses: "actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" # v4 with: subject-path: "archives/*.tar.gz, archives/*.zip" + - name: "Extract release notes" + run: | + VERSION="${GITHUB_REF_NAME##*/v}" + awk -v ver="$VERSION" ' + /^## \[/ { if (found) exit; if ($0 ~ "\\[" ver "\\]") found=1 } + found + ' cmd/prb/CHANGELOG.md > release-notes.md - name: "Create GitHub release" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -139,7 +146,7 @@ jobs: gh release create "${GITHUB_REF_NAME}" \ --title "${GITHUB_REF_NAME}" \ - --notes-file cmd/prb/CHANGELOG.md \ + --notes-file release-notes.md \ $PRERELEASE_FLAG \ archives/* sbom.json - uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f" # v7 diff --git a/.github/workflows/release-probod-bootstrap.yaml b/.github/workflows/release-probod-bootstrap.yaml index 459653d5d..b2d3aa9f7 100644 --- a/.github/workflows/release-probod-bootstrap.yaml +++ b/.github/workflows/release-probod-bootstrap.yaml @@ -126,6 +126,13 @@ jobs: uses: "actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" # v4 with: subject-path: "archives/*.tar.gz, archives/*.zip" + - name: "Extract release notes" + run: | + VERSION="${GITHUB_REF_NAME##*/v}" + awk -v ver="$VERSION" ' + /^## \[/ { if (found) exit; if ($0 ~ "\\[" ver "\\]") found=1 } + found + ' cmd/probod-bootstrap/CHANGELOG.md > release-notes.md - name: "Create GitHub release" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -139,7 +146,7 @@ jobs: gh release create "${GITHUB_REF_NAME}" \ --title "${GITHUB_REF_NAME}" \ - --notes-file cmd/probod-bootstrap/CHANGELOG.md \ + --notes-file release-notes.md \ $PRERELEASE_FLAG \ archives/* sbom.json - uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f" # v7 diff --git a/.github/workflows/release-probod.yaml b/.github/workflows/release-probod.yaml index f18b3ba90..ac484eae7 100644 --- a/.github/workflows/release-probod.yaml +++ b/.github/workflows/release-probod.yaml @@ -310,7 +310,11 @@ jobs: env: IMAGE_TAG: ${{ needs.docker-manifest.outputs.image_tag }} run: | - cp cmd/probod/CHANGELOG.md release-notes.md + VERSION="${GITHUB_REF_NAME##*/v}" + awk -v ver="$VERSION" ' + /^## \[/ { if (found) exit; if ($0 ~ "\\[" ver "\\]") found=1 } + found + ' cmd/probod/CHANGELOG.md > release-notes.md cat >> release-notes.md << EOF ## Docker Images