Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- "v2.[0-9]+.[0-9]+*"
# Ignore release versions tagged with -rc0 suffix
- "!v2.[0-9]+.[0-9]-rc0"

jobs:
generate-notes:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -59,16 +58,45 @@ jobs:
reno report --no-show-source --ignore-cache --version v${{ steps.version.outputs.current_release }} -o relnotes.rst

- name: Convert to Markdown
uses: docker://pandoc/core:3.1
uses: docker://pandoc/core:3.8
with:
args: "--from rst --to markdown_github --no-highlight relnotes.rst -o relnotes.md --wrap=none"
args: "--from rst --to gfm --syntax-highlighting=none --wrap=none relnotes.rst -o relnotes.md"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some arguments were deprecated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we can also do something like:

"--from rst --to gfm --syntax-highlighting=none --wrap=none relnotes.rst -o enhanced_relnotes.md"

to save the copy step below. Your choice!

Copy link
Copy Markdown
Member Author

@anakin87 anakin87 Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, unfortunately pandoc creates a markdown files that cannot be later modified (wrong permissions).
I also tried to run chmod and I got other permission issues. I am creating the copy for this reason.
If you have better ideas, feel free to share.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's then leave things as is (since it's working). I would add a comment about that, maybe next time we could try to investigate better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Comment added in 719219a


# We copy the relnotes file since the original one cannot be modified due to permissions
- name: Copy relnotes file
run: |
cat relnotes.md > enhanced_relnotes.md

- name: Add contributor list
# only for minor releases and minor release candidates (not bugfix releases)
if: endsWith(steps.version.outputs.current_release, '.0')
env:
GH_TOKEN: ${{ github.token }}
START: v${{ steps.version.outputs.current_release }}-rc0
END: ${{ github.ref_name }}
run: |
JQ_EXPR='[.commits[].author.login]
| map(select(. != null and . != "HaystackBot" and . != "dependabot[bot]"))
| unique
| sort_by(ascii_downcase)
| map("@\(.)")
| join(", ")'
CONTRIBUTORS=$(gh api "repos/deepset-ai/haystack/compare/$START...$END" \
Comment thread
mpangrazzi marked this conversation as resolved.
--jq "$JQ_EXPR") || { echo "Unable to fetch contributors"; exit 1; }

{
echo ""
echo "## 💙 Big thank you to everyone who contributed to this release!"
echo ""
echo "$CONTRIBUTORS"
} >> enhanced_relnotes.md

- name: Debug
run: |
cat relnotes.md
cat enhanced_relnotes.md

- uses: ncipollo/release-action@v1
with:
bodyFile: "relnotes.md"
prerelease: ${{ steps.version.outputs.current_pre_release }}
bodyFile: "enhanced_relnotes.md"
prerelease: ${{ steps.version.outputs.current_pre_release != '' }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prerelease should be a boolean. The current approach was not working to set a version as pre-release.

allowUpdates: true
Loading