-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Automated scheduled releases with changelogs [WIP] #46
base: main
Are you sure you want to change the base?
Conversation
b7d30d8
to
3387bac
Compare
scripts/check-changelog.sh
Outdated
root=$1 | ||
prNumber=$2 | ||
|
||
nonUserFacingString='this is not a user-facing change' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we should have a PR template to make it easier to un-comment this string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah there's definitely something to improve here, though it's not trivial, because this doesn't take into account whether the string occurs in a comment or not. So we'd have to start using some parser.
Maybe it could be a checkbox that has to be ticked instead, something like:
- This change is not user-facing and therefore doesn't need a changelog entry
I'm thinking this would work pretty well. Edit: Now using this with a PR template
I can't help it |
You're on point 😅 (though I had to lookup NIH!) Tbh it really surprised me to not find anything like this existing already, it seems like a relatively straightforward idea. If there's anything that does that already I think it would be great to use it instead! |
I'm just poking fun! I was reminded of it around the xz utils backdoor news when I was reading Running the “Reflections on Trusting Trust” Compiler. Made me wonder how long the idea goes back. |
be43c10
to
b84a9dc
Compare
53a016f
to
919848f
Compare
0363b55
to
3a64026
Compare
5ac0b44
to
4077e81
Compare
This adds a fully automated changelog and version pipeline, fixing #38. I looked into mainly Towncrier and Changie, but both of them weren't super integrated, so I wrote my own solution, which ended up being fairly simple.
The solution here works like this:
Every PR has to have a "This change is user-facing" checkbox to the PR description (checked in the default PR template), and either:
Uncheck it to indicate it's not a user-facing change
Or add a changelog by creating a file in one of
changes/unreleased/{major,medium,minor}
.The file has to be a markdown file with its first line like
#
(and no other lines starting with#
).Every week on Tuesday (presumably after the automated update PR from Monday is merged, but can also be triggered manually at any point), a version PR is opened if the main branch has any unreleased changelogs. This PR includes:
Depending on whether there are any major, medium or only minor changelogs, the appropriate version number is bumped in
Cargo.toml
A new
changes/released/$MAJOR.$MEDIUM.$MINOR.md
file that compiles all previously unreleased changelogs into a single file. Each changelog entry is a Markdown list entry of the formThe author and PR number is automatically determined based on which PR added the changelog file.
Once that PR is merged (optionally with manual updates), the release will be published, with the compiled changelog included.
Currently there's nothing that would ever update the changelog of releases, but I don't expect that to be necessary.
This PR needs more testing and comments before it can be merged.
This work is sponsored by Antithesis ✨