|
7 | 7 | - "v2.[0-9]+.[0-9]+*" |
8 | 8 | # Ignore release versions tagged with -rc0 suffix |
9 | 9 | - "!v2.[0-9]+.[0-9]-rc0" |
10 | | - |
11 | 10 | jobs: |
12 | 11 | generate-notes: |
13 | 12 | runs-on: ubuntu-latest |
@@ -59,16 +58,45 @@ jobs: |
59 | 58 | reno report --no-show-source --ignore-cache --version v${{ steps.version.outputs.current_release }} -o relnotes.rst |
60 | 59 |
|
61 | 60 | - name: Convert to Markdown |
62 | | - uses: docker://pandoc/core:3.1 |
| 61 | + uses: docker://pandoc/core:3.8 |
63 | 62 | with: |
64 | | - args: "--from rst --to markdown_github --no-highlight relnotes.rst -o relnotes.md --wrap=none" |
| 63 | + args: "--from rst --to gfm --syntax-highlighting=none --wrap=none relnotes.rst -o relnotes.md" |
| 64 | + |
| 65 | + # We copy the relnotes file since the original one cannot be modified due to permissions |
| 66 | + - name: Copy relnotes file |
| 67 | + run: | |
| 68 | + cat relnotes.md > enhanced_relnotes.md |
| 69 | +
|
| 70 | + - name: Add contributor list |
| 71 | + # only for minor releases and minor release candidates (not bugfix releases) |
| 72 | + if: endsWith(steps.version.outputs.current_release, '.0') |
| 73 | + env: |
| 74 | + GH_TOKEN: ${{ github.token }} |
| 75 | + START: v${{ steps.version.outputs.current_release }}-rc0 |
| 76 | + END: ${{ github.ref_name }} |
| 77 | + run: | |
| 78 | + JQ_EXPR='[.commits[].author.login] |
| 79 | + | map(select(. != null and . != "HaystackBot" and . != "dependabot[bot]")) |
| 80 | + | unique |
| 81 | + | sort_by(ascii_downcase) |
| 82 | + | map("@\(.)") |
| 83 | + | join(", ")' |
| 84 | + CONTRIBUTORS=$(gh api "repos/deepset-ai/haystack/compare/$START...$END" \ |
| 85 | + --jq "$JQ_EXPR") || { echo "Unable to fetch contributors"; exit 1; } |
| 86 | +
|
| 87 | + { |
| 88 | + echo "" |
| 89 | + echo "## 💙 Big thank you to everyone who contributed to this release!" |
| 90 | + echo "" |
| 91 | + echo "$CONTRIBUTORS" |
| 92 | + } >> enhanced_relnotes.md |
65 | 93 |
|
66 | 94 | - name: Debug |
67 | 95 | run: | |
68 | | - cat relnotes.md |
| 96 | + cat enhanced_relnotes.md |
69 | 97 |
|
70 | 98 | - uses: ncipollo/release-action@v1 |
71 | 99 | with: |
72 | | - bodyFile: "relnotes.md" |
73 | | - prerelease: ${{ steps.version.outputs.current_pre_release }} |
| 100 | + bodyFile: "enhanced_relnotes.md" |
| 101 | + prerelease: ${{ steps.version.outputs.current_pre_release != '' }} |
74 | 102 | allowUpdates: true |
0 commit comments