From a37619998fb5743bd2e8ee11e4b2148df8f5f866 Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Fri, 19 Sep 2025 17:45:29 -0300 Subject: [PATCH] Fix the changes gathering for the gh-release job Towncrier was being called on a commit after the release commit, but the towncrier fragments are consumed when a relase commit is created on the release workflow. --- templates/github/.github/workflows/publish.yml.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/github/.github/workflows/publish.yml.j2 b/templates/github/.github/workflows/publish.yml.j2 index debc4c6a..ae6a448a 100644 --- a/templates/github/.github/workflows/publish.yml.j2 +++ b/templates/github/.github/workflows/publish.yml.j2 @@ -155,8 +155,11 @@ jobs: pip install towncrier - name: "Get release notes" - id: get_release_notes + id: "get_release_notes" + shell: "bash" run: | + # The last commit before the release commit contains the release CHANGES fragments + git checkout "${TAG_NAME}~" NOTES=$(towncrier build --draft --version $TAG_NAME) echo "body<> $GITHUB_OUTPUT echo "$NOTES" >> $GITHUB_OUTPUT