Skip to content

Conversation

@kwankyu
Copy link
Collaborator

@kwankyu kwankyu commented Dec 6, 2024

Fixes the issue raised in sagemath/website#480 (comment)

I manually edited the release https://github.com/sagemath/sage/releases/tag/10.5 generated by an workflow implemented in sagemath/website#480 to correct the changelog https://github.com/sagemath/website/blob/master/src/changelogs/sage-10.5.txt, which is now in good shape. But see, for example, https://github.com/sagemath/sage/releases/tag/10.4 that contains all changes in betas and rcs.

This PR is for automatic generation of a release that contains only changes from the last release.

test:
https://github.com/kwankyu/sage/releases
https://github.com/kwankyu/sage/actions/runs/12191414258/job/34010494299

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@github-actions
Copy link

github-actions bot commented Dec 6, 2024

Documentation preview for this PR (built with commit 4aea0e0; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@kwankyu kwankyu marked this pull request as ready for review December 6, 2024 02:02
@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 23, 2024

@soham30rane Would you review?

Comment on lines +133 to +139
https://api.github.com/repos/${{ github.repository }}/releases \
-d '{
"tag_name": "${{ github.ref_name }}",
"previous_tag_name": "${latest_release_tag}",
"prerelease": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
"generate_release_notes": true
}'
Copy link
Contributor

Choose a reason for hiding this comment

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

I went through the official docs and didn't found parameter previous_tag_name for Create a release endpoint. So it seems, even if generate_release_notes is set to true, the previous_tag_name plays no role.

The parameter previous_tag_name exists for generate release notes endpoint. This endpoint will return the name and body according to specified parameters, which could be then used to create a release using create a release endpoint

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nonetheless it works fine.

It seems that "generate_release_notes": true internally triggers the "generate release notes" endpoint as well, which uses previous_tag_name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will check again.

@kwankyu kwankyu merged commit 4aea0e0 into sagemath:develop Dec 23, 2024
21 of 23 checks passed
@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 23, 2024

Sorry for the confusing state of this PR.

By an accident related with my privileged account (damn it!), I erroneously merged this PR branch to the develop branch. I instantly restored the develop branch, but I cannot restore this PR to the previous state.

So I created a new PR #39194 for the branch. Sorry for inconveniences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants