Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement release creation workflow #39194

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

kwankyu
Copy link
Collaborator

@kwankyu kwankyu commented Dec 23, 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/12485317339/job/34844199681

📝 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

@kwankyu kwankyu marked this pull request as ready for review December 23, 2024 14:18
@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 23, 2024

I am investigating the issue raised in #39083 (comment)

Copy link

github-actions bot commented Dec 23, 2024

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

@tobiasdiez
Copy link
Contributor

But see, for example, https://github.com/sagemath/sage/releases/tag/10.4 that contains all changes in betas and rcs.

From a user's perspective, is this not the most comfortable way to list the changes? If I'm on the latest stable 10.4 (like most "normal users") and upgrade to 10.5, I would like to see all the changes between those versions, or not?

@kwankyu kwankyu force-pushed the p/fix-release-creation branch from 0878679 to e9e421c Compare December 24, 2024 15:05
@kwankyu kwankyu marked this pull request as draft December 24, 2024 15:17
@kwankyu kwankyu force-pushed the p/fix-release-creation branch from e9e421c to 18490a3 Compare December 24, 2024 18:18
@kwankyu kwankyu marked this pull request as ready for review December 24, 2024 19:24
@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 25, 2024

@soham30rane You are correct. The release generation step of the workflow indeed needs to use both APIs as you said in #39083 (comment). It works well now.

@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 25, 2024

But see, for example, https://github.com/sagemath/sage/releases/tag/10.4 that contains all changes in betas and rcs.

From a user's perspective, is this not the most comfortable way to list the changes? If I'm on the latest stable 10.4 (like most "normal users") and upgrade to 10.5, I would like to see all the changes between those versions, or not?

WIth the current workflow, in Releases, a change appears in a beta release first and then reappears in the list of the changes between two stable releases. With this PR, a change appears just once in a beta release between two stable releases. Well, yes, it gets a bit less comfortable. On the other hand, it gets a bit less confusing and compatible with the practice of https://groups.google.com/g/sage-release, and makes the workflow introduced in sagemath/website#480 behave correctly.

@tobiasdiez
Copy link
Contributor

But see, for example, https://github.com/sagemath/sage/releases/tag/10.4 that contains all changes in betas and rcs.

From a user's perspective, is this not the most comfortable way to list the changes? If I'm on the latest stable 10.4 (like most "normal users") and upgrade to 10.5, I would like to see all the changes between those versions, or not?

WIth the current workflow, in Releases, a change appears in a beta release first and then reappears in the list of the changes between two stable releases. With this PR, a change appears just once in a beta release between two stable releases. Well, yes, it gets a bit less comfortable. On the other hand, it gets a bit less confusing and compatible with the practice of https://groups.google.com/g/sage-release, and makes the workflow introduced in sagemath/website#480 behave correctly.

Okay, makes sense.

@soham30rane
Copy link
Contributor

Looks good overall !
I'm unsure about the token permissions, especially for the POST request to create the release. Does the GITHUB_TOKEN have sufficient scope for this?

@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 26, 2024

The action softprops/action-gh-release@v already works without an elevated permission, perhaps because GITHUB_TOKEN has "read and write" permissions in the settings. I see no reason that the new workflow is different in that regard. It also works well in my test repo.

@soham30rane
Copy link
Contributor

Okay Great! It seems good to go! Thank you

@kwankyu
Copy link
Collaborator Author

kwankyu commented Dec 30, 2024

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 1, 2025
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

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/sr
c/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/12485317339/job/34844199681

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] 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

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39194
Reported by: Kwankyu Lee
Reviewer(s): Soham Rane
@vbraun vbraun merged commit 65a38a5 into sagemath:develop Jan 4, 2025
22 of 24 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 7, 2025
…aracters

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The new release creation workflow introduced by
sagemath#39194 failed for the latest
release:

https://github.com/sagemath/sage/actions/runs/12612595224/job/3514974517
9

with the message "Problems parsing JSON". See the "Create release" step.
Reported by passagemath/passagemath#638

We fix it by escaping special characters in `release_notes` for json
input.

test: https://github.com/kwankyu/sage/releases/tag/10.7.beta3
test workflow run:
https://github.com/kwankyu/sage/actions/runs/12620257460/job/35165981375

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] 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

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39288
Reported by: Kwankyu Lee
Reviewer(s): Soham Rane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants