-
Notifications
You must be signed in to change notification settings - Fork 8
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
Release only if changes exist #2
Conversation
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.
Idea makes sense to me but I lack experience with github workflows and zsh
to know whether there are subtle issues with it.
Did you test the change for example by temporarily configuring it to trigger on a PR?
.github/workflows/release.yml
Outdated
- name: Check for changes since last tag | ||
id: check_changes | ||
run: | | ||
LATEST_TAG=$(git tag --sort=-authordate --merged=main | head --lines 1) |
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.
I believe this needs to sort by commit date in case we merge a commit that was authored before some other commit but only merged afterwards.
Probably an edge case that might never arise but this seems safer regardless.
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.
Tested on pull_request. Switched to committerdate
sorting.
037864f
to
6359024
Compare
bf59071
to
bf3345e
Compare
Skip the weekly release if there are no changes.